Page MenuHomePhabricator

Inline Kartographer mapframes: Take precision into account
Open, Needs TriagePublic

Description

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 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?

Event Timeline

hoo created this task.Dec 11 2018, 11:16 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 11 2018, 11:16 AM
Ayack added a subscriber: Ayack.Dec 11 2018, 2:23 PM
Ainali added a subscriber: Ainali.Dec 12 2018, 3:49 PM