I'm not sure exactly what I'm missing here. I have this code
executing as an onclick event on a button. When the button is
pressed, you see the second polygon (only). If you hit it really
fast, you can see both polygons on the map prior to the layer being
loaded...I'm guessing thats just a trick of the eye and the first is
disappearing as the second is drawn.
<code>
map = new google.maps.Map(document.getElementById("map"),
map_options);
path_options.paths = top_path;
var top_shape = new google.maps.Polygon(path_options);
top_shape.setMap(map);
map = new google.maps.Map(document.getElementById("map"),
map_options);
path_options.paths = bottom_path;
var bottom_shape = new google.maps.Polygon(path_options);
bottom_shape.setMap(map);
</code>
On Dec 1, 5:47 pm, Esa <[email protected]> wrote:
> You define the map over and over again before each polygon.
>
> var map = new google.maps.Map(document.getElementById("map_canvas"),
> myOptions);
>
> Keep the first of those lines and delete the other ones.
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.