Open valerio-bozzolan opened 1 month ago
Hello, @valerio-bozzolan ! Interface URL point like https://wikimap.toolforge.org/api.php?cat=Pavlovsk_park&subcats&subcatdepth=8&camera=true&locator=true&allco=true yet gives bearing. You also can find, observe and use code under the API.
Super interesting!
I do not understand if the above API "just" reads the bearing from the template, or, if it calculates it on-the-fly.
OK so you say that https://commons.wikimedia.org/wiki/File:009._Pavlovsk._Pavlovsky_Park.jpg
returns {"pageid":58214112,"ns":6,"title":"File:009. Pavlovsk. Pavlovsky Park.jpg","coordinates":[{"lat":59.6843,"lon":30.44962,"primary":true,"bearing":218,"cam":""}
and - since I cannot see the bearing nor in structured data, nor in the template - so it seems it's generating that 🤩
Now let's see that source code:
@valerio-bozzolan I am sorry for closed source code of DB111's utility... Searching under https://commons.wikimedia.org/w/api.php?action=help doesn't seems me easy for our trivial example.
This lovely tool has the potential ability to automagically calculate the bearing. That is, the direction between the location of the person, and the location of the object.
I'm talking about the
heading:
parameter here:https://commons.wikimedia.org/wiki/Template:Location
Further details:
https://phabricator.wikimedia.org/T363052
This is an issue that may be interesting during hackatons, or this kind of things \o/