-
Notifications
You must be signed in to change notification settings - Fork 377
Js Methods
Benjamin Roth edited this page Oct 22, 2013
·
8 revisions
I encourage you to read the source, it's pretty straight forward.
The main principle is: the handler invokes builders returning model instances.
So:
- if you want to change how your objects are built, change the builders.
- if you want to change the object you retrieve, change the models.
The handler lets you create all overlays.
Collection methods are:
addMarkers(array_of_data, options)addCircles(array_of_data, options)addPolylines(array_of_data, options)addPolygons(array_of_data, options)addKmls(array_of_data, options)
If you only have to add a single overlay:
addMarker(data, options)addCircle(data, options)addPolyline(data, options)addPolygon(data, options)addKml(data, options)
data are info expected to build our object. options are the one used by google, straight.
{Check the builders to get all details}[https://github.com/apneadiving/Google-Maps-for-Rails/tree/master/vendor/assets/javascripts/gmaps/google/builders], they are provided before the constructor.