Closed ghost closed 10 years ago
Good idea :)
Since its attached to the map, attach it to the map too.
//currently you can do
handler.getMap().data.loadGeoJson(...)
// but you can add a method here: https://github.com/apneadiving/Google-Maps-for-Rails/blob/master/vendor/assets/javascripts/gmaps/google/objects/map.coffee
// to have:
handler.map.loadGeoJson(...)
@apneadiving awesome, I will give it a shot.
handler.getMap().data.loadGeoJson(...) worked fine, I just was loading an older version of API so using the latest API version has loadGeoJson method. thanks!
Google Maps API supports loading GeoJSON to a map.data layer with the loadGeoJson method that accepts a url to the json, which I'm planning to use with json output from same Rails app loading the map.
This adds features from the geojson like multipolygons or whatever it may be to the map. I'm trying to get a handle on how things work in source, but is there a way to directly call this loadGeoJson from a gmaps handler object or will something need changed in the builder to support this?