-
Notifications
You must be signed in to change notification settings - Fork 378
Circles
apneadiving edited this page Mar 17, 2011
·
4 revisions
Valid json to provide should be like:
@circles_json = '[
{"longitude": -122.214897, "latitude": 37.772323, "radius": 1000000},
//you can add whatever customization within the hash
{"longitude": 122.214897, "latitude": 37.772323, "radius": 1000000, "strokeColor": "#FF0000"}
]'
radius is in meters.
strokeColor: "#0000",
strokeOpacity: 0.8,
strokeWeight: 2,
fillColor: "#000",
fillOpacity: 0.35
<%= gmaps({
"circles" => { "data" => @circles_json }
})
%>
Simply pass options you want to override in a hash.
<%= gmaps({
"circles" => { "data" => @circles , "options" => { "fillColor" => "#FF0000" } }
})
%>