Page MenuHomePhabricator

Snapshot service does not handle auto-positioning
Closed, ResolvedPublic

Description

To see this, look at https://test.wikipedia.org/wiki/Mapframe#GeoShapes_external_data - Note how the Interstate Highway I-696 example does not specify a zoom/lat/lon, and autopositioning is not working in snapshot service. The Alaska example looks good because zoom/lat/lon are specified.

for example:
<mapframe lat=. lon=. zoom=.> { .ExternalData - WDQS query. } </mapframe>

if the lat/lon is missing, the map breaks.

Related Objects

StatusSubtypeAssignedTask
ResolvedMSantos
ResolvedMaxSem
InvalidNone
OpenNone
ResolvedJGirault
ResolvedJGirault
OpenNone
ResolvedYurik
ResolvedJGirault
ResolvedJGirault
ResolvedEsanders
ResolvedJGirault
ResolvedYurik
ResolvedYurik
ResolvedMaxSem
ResolvedYurik
ResolvedYurik
ResolvedJGirault
ResolvedYurik
ResolvedYurik
ResolvedCatrope
DeclinedNone
OpenNone
OpenBUG REPORTNone
ResolvedYurik
ResolvedJGirault
Resolveddebt
Resolveddebt
Resolveddebt
ResolvedDereckson
Resolveddebt
Resolveddebt
ResolvedDatGuy
ResolvedUrbanecm
Resolveddebt
ResolvedJayprakash12345
InvalidJayprakash12345
ResolvedCatrope
ResolvedUrbanecm
ResolvedUrbanecm
ResolvedZabe

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Yurik raised the priority of this task from Medium to High.Nov 26 2016, 4:15 AM
Yurik moved this task from Backlog to To-do on the Maps-Sprint board.

Seems like some users have tried to make it without the lat/lon, so it would appear to be a needed feature. Raising to high. @JGirault - would you like to hack on it, or should I?

JGirault removed a project: Maps.
JGirault moved this task from To-do to In progress on the Maps-Sprint board.

This feature is absolutely necessary! When people have to search manually for a suitable coordinate the whole advantage of <mapframe> is lost.

Hey @Yurik, I have a pull request. Do you mind reviewing https://github.com/kartotherian/kartotherian-snapshot/pull/2 ?

Generating an image may be a little slower with this feature because we have to download the external data before painting the base map.
Also after a first intent at reinventing the wheel without leaflet, I finally decided to reuse leaflet code to calculate the bounds.
The problem with this approach is that we have to fake a DOM, that's why I use leaflet-headless. Take a look and let me know what you think.

Update: the pull request was merged into kartotherian-snapshot master branch, now we need to deploy it to production.