apneadiving / Google-Maps-for-Rails

Enables easy Google map + overlays creation in Ruby apps
https://apneadiving.github.io/
MIT License
2.26k stars 382 forks source link

Polygons with holes #369

Closed MarcDahlem closed 10 years ago

MarcDahlem commented 11 years ago

Hi,

first thanks for your great work!

I am wondering if (and if: how) I can create holes in a polygon. Is that already possible in this gem? When I have a json like shown here, I get a grey gmap and its not showing anything:

[//all polygons [//polygon1 [//real polygon {"lng": 7.759996, "lat": 49.436637}, {"lng": 7.759301, "lat": 49.437452}, {"lng": 7.762973, "lat": 49.438938}, {"lng": 7.763393, "lat": 49.437809} ], [//hole1 {"lat": 49.437447, "lng": 7.761192, "fillOpacity": 1.0}, {"lat": 49.437557, "lng": 7.761602}, {"lat": 49.437644, "lng": 7.761312} ] ] ]

Example how it should look like: Map: http://googlemapapitutorial.com/polygonwithhole.html Code: http://googlemapapitutorial.com/polygonwithhole.jsp

Thanks for your help!

Best regards, Marc

apneadiving commented 10 years ago

sorry, it not a supported option. Check v2 if you want very flexible js