My question: when I click on the <img/> element on the screen, is there a way to get the associated GeoImage object data? I can easily access the image from the object, but I want it so that by clicking the image on the page, you can then retrieve the latitude,longitude, etc... There are multiple geoimages on the page at all times(I have an array of geoimages). What can I put in the <img/> click handler to access the data? Here is a simple example of what I want to do:
function GeoImage
(lat,lon,url){
this.lat = lat;
this.lon =
l
on;
this
.img =
$('<img/>').attr("src",url);
};
var geoimage = new GeoImage(lat,lon,url);
$("#img_container").append(geoimage.img);
$("#img_container img").click(function(evt){
// How do I access the GeoImage object for this specific image element? Is it possible?
});
I'm probably missing something very basic...Thanks for reading!