Page MenuHomePhabricator

Compute smart defaults when no latitude and longitude is given
Closed, DuplicatePublic

Description

It would be nice to have better default than (0;30) when no latitude and longitude is provided.
It would require to implement in PHP something similar to the MapBox default value computation.

Event Timeline

Mholloway subscribed.

Can you be more specific about what you'd like to see happen?

For example if the call to mapframe is:

<mapframe width="350" height="350">
{
  "type": "Feature",
  "geometry": { "type": "Point", "coordinates": [-122.3988, 37.8013] },
  "properties": {
    "title": "[[wikipedia:Exploratorium|Exploratorium]]",
    "description": "[[File:Giant_Mirror_at_the_Exploratorium.jpeg|200px]]",
    "marker-symbol": "museum",
    "marker-size": "large",
    "marker-color": "0050d0"
  }
}
</mapframe>

The static map caption has a zoom level of 1 and is centered at something like 0,0. I would like to get a caption centered at 37.8013, -122.3988 with a relevant zoom level (something like 13) just like what is done with the interactive UI.

Test page: https://fr.wikipedia.org/wiki/Utilisateur:Tpt/test_1

Thanks! The current task seems to duplicate that one indeed.