webglearth / webglearth2

[UNMAINTAINED] WebGL Earth 2 - the source code of the project
Apache License 2.0
888 stars 212 forks source link

Is there a marker onclick hook? #71

Closed mLuby closed 8 years ago

mLuby commented 8 years ago

I only see an event listener on the map itself in the API, but since there's an explicit bindPopup event on click, maybe there's a more general version exposed but not documented?

mLuby commented 8 years ago

Never mind, can do

  const marker = WE.marker([latitude, longitude], markerImagePath)
  marker.addTo(earth)
  marker.element.onclick = clickHandler