Closed Nailen closed 10 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}
})
%> <%= 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!
and btw, they are also not clickable, the act like polylines and not like polygons
How do you add the polygon after your ajax call?
clickable is set to false by default for both polylines and polygons.
clickable
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!