I'm developing a site where I'd like a marker to show up on the map
based on a set of lat/lon coordinates sent via a flash chart. Roll
over the elevation plot below the map and a marker will appear in the
proper map location. Here's the page:
http://www.gpsapp.net/gps/view_map2.php?id=168

As you can see addOverlay is working just fine. Cool effect but not
really functional... I need to remove the last marker each time a new
marker is added to the map but I've hit a wall. Tried passing the
markers to an array, setting a "prevMarker" variable - no dice. When I
try to call removeOverlay the map stops plotting the markers
altogether (even if it's calling a non-existent marker). Here's a
snippet:

var MarkersArray = [];
function amRolledOverSeries(chart_id, series){
  document.getElementById("series_hover").value = series;
  xindex = parseInt(series * 100);
  latw = latp[xindex];
  lonw = lonp[xindex];
  Counter++;

  var point = new GLatLng(latw, lonw);
  var marker = createMarker(point, "", "", "Default.png");
  gmap.addOverlay(marker);
  MarkersArray[Counter] = marker;
  // gmap.removeOverlay(MarkersArray[Counter-1]);
}

The commented part is where I run into problems. When I turn this on,
I get no markers. Any ideas?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to google-maps-api@googlegroups.com
To unsubscribe from this group, send email to 
google-maps-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to