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

Polygon fillColor #239

Closed Nailen closed 10 years ago

Nailen commented 12 years ago

Don't know if its a bug but if is execute this client side <%@foo=[[ { 'lng' => 55.0, 'lat' => 10.0, 'strokeColor' => '#FF0000', 'strokeOpacity' => 0.3, 'strokeWeight' => 1, 'fillColor' => '#FF0000', 'fillOpacity' => 0.7 }, {'lng' => 56.0, 'lat' => 10.0}, {'lng' => 56.0, 'lat' => 11.0}, {'lng' => 55.0, 'lat' => 10.0}, ]%>

<%= gmaps({"map_options" => @options, "id" => "map", "polygons" => {"data" => @foo}

"markers" => {"data" => DistrictFact.all.to_gmaps4rails},

      })

%> <%= yield :scripts %>

i get a filled polygon.

if i get the same array trough a ajax request i get the same polygon, with the same coordinates and everything, stroke weight and so on, the only difference is, there are not filled!

Nailen commented 12 years ago

and btw, they are also not clickable, the act like polylines and not like polygons

apneadiving commented 12 years ago

How do you add the polygon after your ajax call?

clickable is set to false by default for both polylines and polygons.