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

@@ -132,7 +132,10 @@ map.on('click', function(evt) {
}, 1);
});
$(map.getViewport()).on('mousemove', function(evt) {
map.on('pointermove', function(evt) {
if (evt.dragging) {
return;
}
var pixel = map.getEventPixel(evt.originalEvent);
var hit = map.hasFeatureAtPixel(pixel);
map.getTarget().style.cursor = hit ? 'pointer' : '';