simplegeo / polymaps

Polymaps is a free JavaScript library for making dynamic, interactive maps in modern web browsers.
http://polymaps.org/
Other
1.6k stars 213 forks source link

Adding interactivity to the map #73

Closed mathildev closed 13 years ago

mathildev commented 13 years ago

Hi,

I'd like to create a feature on a user's click on the map. But i cann't find how to add an event "on click" on the element map AND find the location of the pixel where the user clicked. I tried to use JQuery for creating the event, but i didn't find how to get the coordinates (x and y are NaN).

Could someone help me please?

mathildev commented 13 years ago

Sorry, i doubt my question is in the right place. i'll try to find support on the IRC channel.

RyanEwen commented 12 years ago

Hi there,

Did you end up figuring this out?

I am simply trying to catch 'onclick' on the map without any regard for the specific coordinates. I want to enable map.arrow when the map is clicked, and disable it when something outside of the map is clicked.

I can't seem to catch an 'onclick' event on the or even my 's. I can get one on a tile image.. but that seems like a bad idea.

RyanEwen commented 12 years ago

Never mind.. I had a dumb mistake preventing me from catching the click on my svg element. Oops..