-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling click event on image #42
Comments
Hello, You could do something like this in order to add a callback function for the "click" event on your images :
|
Hi Nev i make this work, the solution you gave me work perfectly. Now i have another question, how can i do to delete the old images in the map once i want to update it? |
Hi Diego, I'm glad it helped you ! I'm working since the last weeks on the new version of Mapael that should be released in a few days. You will be able to add images as plotted points through mapael options, try the examples : http://jsfiddle.net/neveldo/z559d0s2/ , http://jsfiddle.net/neveldo/1jjq6g9y/ . It allows you to delete images exactly like a plotted point in the 'update' event. Try it : http://jsfiddle.net/neveldo/v18j6L6d/ . Feel free to download the dev-master version (https://github.com/neveldo/jQuery-Mapael/archive/master.zip) in order to use this feature before the release of mapael 1.0.0 ! |
Thanks for the quick answer, im going to try this with the new version. Here the solution that i did (a little rusty yes xD) :
|
Hey! It has been more than one year. I'm closing this thread. Feel free to submit a new issue if you have any problems. |
Hi again, i'm triying to execute a function on a click event of a image, here is my code:
actualizarMapa = function(a,b,c,d){ // add some new plots ... var updatedOptions = {'images' : {}}; updatedOptions.images['image1'] = { 'src' : 'img/img02.png', 'latitude' : '-34.27083595', 'longitude' : '-66.54968262', 'width':80, 'height':80 }; updatedOptions.images['image2'] = { 'src' : 'img/img01.png', 'latitude' : '-32.15701249', 'longitude' : '-65.67077637', 'width':80, 'height':80 };
I could put a pointer cursor via CSS, but i cant handle the click event in the image, do you have any ideas? Can i add a new attr to the image object?
The text was updated successfully, but these errors were encountered: