Page MenuHomePhabricator

Auto zoom/position doesn't work with masks
Closed, ResolvedPublic

Description

In this demo, map only has one geojson object - a mask, which is not being detected for setting coordinates correctly. I suspect the same will fail if the polygon was not inverted, but instead just had a valid small region somewhere.

<mapframe width="650" height="400" mode="interactive" show="poi">{
  "type": "FeatureCollection",
  "features": [
{
  "type": "Feature",
  "properties": {},
  "geometry": {
    "type": "Polygon",
    "coordinates": [
[[3600,-180],[3600,180],[-3600,180],[-3600,-180],[3600,-180]],
[[-122.4267,37.8081],[-122.4265,37.8082],[-122.4264,37.8077],[-122.4260,37.8072],[-122.4251,37.8068]
...

Event Timeline

Yurik created this task.Jun 23 2016, 10:08 PM
Restricted Application added a project: Discovery. · View Herald TranscriptJun 23 2016, 10:08 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald Transcript
JGirault moved this task from Backlog to To-do on the Maps-Sprint board.Jul 12 2016, 12:16 AM

Change 303551 had a related patch set uploaded (by JGirault):
Use polygon holes when auto positioning a map (for masks)

https://gerrit.wikimedia.org/r/303551

JGirault moved this task from To-do to Needs review on the Maps-Sprint board.Aug 8 2016, 2:59 PM

Change 303551 merged by jenkins-bot:
Use polygon holes when auto positioning a map (for masks)

https://gerrit.wikimedia.org/r/303551

JGirault closed this task as Resolved.Aug 8 2016, 9:10 PM