As an editor I want to have the map zoom level for a geocoordinate statement take into account the precision in order to avoid people being confused by a high zoom-level that implies a much higher precision than intended.
Problem:
The map is displayed at an inappropriately high zoom level (13) which does not include all of the area whose coordinates would round to that value. This is misleading and contributes to people thinking such coordinates are incorrect, rather than only imprecise.
The map should take the precision into account and use a more appropriate zoom level (e.g. 5), one which includes the entire area which would round to those coordinates.
Example:
https://test.wikidata.org/wiki/Q105715
Screenshots/mockups:
Screenshot of how 50°N 10°E currently displays:
Screenshot showing the same coordinates but as a bounding box covering 49.5°N 9.5°E to 50.5°N 10.5°E (taken from http://bboxfinder.com/), zoomed out so that the bounding box is approximately the same size as the marker in the original map, and then cropped to be the same size as the original:
BDD
GIVEN
AND
WHEN
AND
THEN
AND
Acceptance criteria:
Original ticket:
After T184933: Display map for geocoordinate statements we now have small inline maps which are obtained using Kartographer mapframes, but as @TheDJ pointed out in T184933#4812900:
Currently these are being generated by just creating a GeoJSON point from the value (in CachingKartographerEmbeddingHandler::getWikiText): "geometry": { "type": "Point", "coordinates": [' . $value->getLongitude() . ', ' . $value->getLatitude() . '] }, (where $value is a [[https://github.com/DataValues/Geo/blob/master/src/Values/GlobeCoordinateValue.php|GlobeCoordinateValue]]). This currently doesn't take the precision into account at all (also not for setting the map's zoom, which is hard coded at 13).
We should probably base both the zoom and the geometry on the precision of the GlobeCoordinateValue. For this we should probably stop using GeoJSON Point, but rather use Polygon with the min/max Lat/Long values within the precision (if Kartographer supports this)?
Is there some other/ nicer/more correct way to do this? How do we compute the zoom from the precision?

