-
Notifications
You must be signed in to change notification settings - Fork 382
Circles
Konstantin edited this page Oct 12, 2015
·
4 revisions
Valid json to provide should be like:
@circles_json = '[
{"lng": -122.214897, "lat": 37.772323, "radius": 1000000},
//you can add whatever customization within the hash
{"lng": 122.214897, "lat": 37.772323, "radius": 1000000, "strokeColor": "#FF0000"}
]'
radius
is in meters.
strokeColor: "#000",
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" } }
})
%>