javascript - MapBox: Markers not showing clickable cursor on mouseover -


i moving leaflet+cloudmade mapbox , have been doing minor rewrites code necessary. refreshing map , in previous installment easiest add each marker in it's own layer , on refresh remove layers , redraw markers.

here current code:

function setleafletmarker(lat, lng, icontype, popuphtml) {      popuphtml = typeof popuphtml !== 'undefined' ? popuphtml : "";     var lammarker = new l.marker([lat, lng], { icon: icontype }); //.on('click', markerclick); ;      markers.push(lammarker);      lammarker.bindpopup(popuphtml);     map.addlayer(lammarker); } 

i suspect has problem, when put mouse cursor on marker, stays hand (draggable) instead of changing pointy finger, meaning marker clickable. clicking works fine, it's not intuitive. how change hand pointy finger?

ran same problem also. did quick check of css on mapbox site, , seem fix using css rule in sitewide css file (not map specific). able fix problem using same approach, adding sitewide css.

.leaflet-overlay-pane path, .leaflet-marker-icon {   cursor: pointer; } 

i have compared default leaflet.css default mapbox.css , leaflet includes

.leaflet-clickable {     cursor: pointer;     } 

while mapbox not.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -