https://bugzilla.wikimedia.org/show_bug.cgi?id=47210

       Web browser: ---
            Bug ID: 47210
           Summary: Polygons not working
           Product: MediaWiki extensions
           Version: master
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Unprioritized
         Component: Maps
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified
   Mobile Platform: ---

I'm using master cloned new today of mediawiki and maps.

If appears to be an issue with the way the polygons array is being created.

This wiki code doesn't work:

{{#display_map:
|polygon=-16.55296172197251,137.98828125:-26.03704188651583,138.1640625:-26.03704188651583,141.064453125:-28.84467368077178,141.064453125:-28.459033019728043,153.984375:-24.52713482259779,152.9296875:-18.56294744288831,147.041015625:-9.709057068618208,142.3828125:-17.224758206624628,140.625:-16.55196172197251,137.98828125
|zoom=3
|centre=Queensland
|width=300
|height=200
}}

The following relevant sections are from this map, and an exact copy with
polygon replaced by lines:

"polygons":["\u000016.55296172197251,137.98828125:-26.03704188651583,138.1640625:-26.03704188651583,141.064453125:-28.84467368077178,141.064453125:-28.459033019728043,153.984375:-24.52713482259779,152.9296875:-18.56294744288831,147.041015625:-9.709057068618208,142.3828125:-17.224758206624628,140.625:-16.55196172197251,137.98828125"]

"lines":[{"text":"","title":"","link":"","strokeColor":"#FF0000","strokeOpacity":"1","strokeWeight":"2","pos":[{"lat":-16.552961721973,"lon":137.98828125},{"lat":-26.037041886516,"lon":138.1640625},{"lat":-26.037041886516,"lon":141.064453125},{"lat":-28.844673680772,"lon":141.064453125},{"lat":-28.459033019728,"lon":153.984375},{"lat":-24.527134822598,"lon":152.9296875},{"lat":-18.562947442888,"lon":147.041015625},{"lat":-9.7090570686182,"lon":142.3828125},{"lat":-17.224758206625,"lon":140.625},{"lat":-16.551961721973,"lon":137.98828125}]}]

The polygon isn't being displayed.

However the polygon works if I manually edit the resulting html file and have
instead:

"polygons":[{"text":"","title":"","link":"","strokeColor":"#FF0000","strokeOpacity":"1","strokeWeight":"2","pos":[{"lat":-16.552961721973,"lon":137.98828125},{"lat":-26.037041886516,"lon":138.1640625},{"lat":-26.037041886516,"lon":141.064453125},{"lat":-28.844673680772,"lon":141.064453125},{"lat":-28.459033019728,"lon":153.984375},{"lat":-24.527134822598,"lon":152.9296875},{"lat":-18.562947442888,"lon":147.041015625},{"lat":-9.7090570686182,"lon":142.3828125},{"lat":-17.224758206625,"lon":140.625},{"lat":-16.551961721973,"lon":137.98828125}]}]

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to