hansemannn / titanium-googlemaps

🗺 Use the Google Maps SDK in Titanium
Other
87 stars 26 forks source link

Polygon holes not works. #137

Closed yuranevmer closed 3 years ago

yuranevmer commented 4 years ago

Hi. Polygon 'holes' property not works as expected; Here is my example polygon:

$.mapView.add(maps.createPolygon({
    "points": [
        [30, 49],
        [30, 50],
        [31, 50],
        [31, 49],
        [30, 49]
    ],
    "fillColor": "#7fff0000",
    "holes": [
        [30.5, 49.5],
        [30.5, 49.7],
        [30.7, 49.7],
        [30.7, 49.5],
        [30.5, 49.5]
    ],
    "zIndex": 10
}))

Screenshot from app: App Screenshot from geojson.io: geojson.io

iOS 13.1, Ti.SDK 8.2.0.GA.

hansemannn commented 3 years ago

The holes have the indices swapped, e.g. latitude at index 1 and longitude at index 0. I just fixed that in v6.1.2!