hello,

i have the following problem with setting events to markers created
with the markermanager:
i used the weather-map example and edited the getWeatherMarkers()
methode to the following:

function getWeatherMarkers(n) {
  var batch = [];
  for (var i = 0; i < n; ++i) {
          temp = new GMarker(getRandomPoint(), { icon: getWeatherIcon() });
          GEvent.addListener(temp, "click", doXY());
          batch.push( temp );
  }
  return batch;
}

the problem is, when loading the map, for each marker the doXY()
function is called, but when clicking one it isn't, i get an error "
this.xh is undefined
http://maps.gstatic.com/intl/de_ALL/mapfiles/184a/maps2.api/main.js
Line 286"

my aim is to execute one of my functions, when i click a marker (and
differ them with theire position or unique id)
can anybody please help me?!

thanks a lot MR

--

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.


Reply via email to