Hi,
I am able to add the overlay but i can not able to remove it. Here is
the code.
function toggle() {
if(document.sacon.polybox.checked)
{
for (var a = 0; a < fallow.length; a++) {
var colour = fallow[a].getAttribute("colour");
var points = fallow[a].getElementsByTagName
("point");
var pts = [];
for (var i = 0; i < points.length; i++) {
pts[i] = new GLatLng(parseFloat(points
[i].getAttribute("lat")),
parseFloat(points[i].getAttribute("lng")));
}
fall = new GPolygon(pts,"#000000",1,1,colour,0.5,
{clickable:false});
map.addOverlay(fall);
}
}
else
{
for (var a = 0; a < fallow.length; a++) {
var pts = [];
var colour = fallow[a].getAttribute("colour");
var points = fallow[a].getElementsByTagName("point");
for (var i = 0; i < points.length; i++) {
pts[i] = new GLatLng(parseFloat(points
[i].getAttribute("lat")),
parseFloat(points[i].getAttribute("lng")));
}
fall = new GPolygon(pts,"#000000",1,1,colour,0.5,
{clickable:false});
map.removeOverlay(fall);
}
}
}
Where I am going wrong?
Looking forward for the solution,
Santosh
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---