[OpenLayers-Users] How do I get a marker icons lon/lat?

Ali Khan akhan at unfpa.org
Mon Jun 4 11:19:03 EDT 2007


Hey, so i've got a few markers on a page when i click the marker i want 
to query a database and load the result into a div. the latter part i 
have down. In the database the URL or Lon/Lat will be stored of the 
marker (Each marker will have a unique image).

So far i have this
    markers.events.register("click", markers, function(e) {
            alert(this.icon.url);
}

however this.icon.url seems to not be valid according to FireBug and 
isn't causing an alert box. How can I get the URL of a Marker icon or 
perhaps the Lon/Lat instead?

Thanks.




More information about the Users mailing list