Use dragging in examples

This commit is contained in:
tsauerwein
2015-01-30 09:16:19 +01:00
parent f2518e4c08
commit 9cc8390dfd
14 changed files with 66 additions and 22 deletions

View File

@@ -86,7 +86,11 @@ map.on('click', function(evt) {
});
// change mouse cursor when over marker
$(map.getViewport()).on('mousemove', function(e) {
map.on('pointermove', function(e) {
if (e.dragging) {
$(element).popover('destroy');
return;
}
var pixel = map.getEventPixel(e.originalEvent);
var hit = map.hasFeatureAtPixel(pixel);
map.getTarget().style.cursor = hit ? 'pointer' : '';