Skip to content
Snippets Groups Projects
Commit d229c987 authored by Reuben Turk's avatar Reuben Turk
Browse files

#738566 by Wim Leers - Remove autozoom when adding a map marker

parent f5c2543a
No related branches found
No related tags found
No related merge requests found
...@@ -33,16 +33,12 @@ Drupal.gmap.addHandler('gmap', function (elem) { ...@@ -33,16 +33,12 @@ Drupal.gmap.addHandler('gmap', function (elem) {
obj.map.addOverlay(obj.locpick_point = new GMarker(point, {draggable: true})); obj.map.addOverlay(obj.locpick_point = new GMarker(point, {draggable: true}));
} }
obj.locpick_point.setLatLng(point); obj.locpick_point.setLatLng(point);
obj.map.zoomIn(point, true, true);
obj.map.zoomIn(point, true, true);
GEvent.addListener(obj.locpick_point, 'drag', function () { GEvent.addListener(obj.locpick_point, 'drag', function () {
obj.locpick_coord = obj.locpick_point.getLatLng(); obj.locpick_coord = obj.locpick_point.getLatLng();
obj.change('locpickchange', binding); obj.change('locpickchange', binding);
}); });
GEvent.addListener(obj.locpick_point, 'dragend', function () { GEvent.addListener(obj.locpick_point, 'dragend', function () {
obj.locpick_coord = obj.locpick_point.getLatLng(); obj.locpick_coord = obj.locpick_point.getLatLng();
obj.map.zoomIn(obj.locpick_coord, true, true);
obj.map.zoomIn(obj.locpick_coord, true, true);
obj.change('locpickchange', binding); obj.change('locpickchange', binding);
}); });
obj.locpick_coord = point; obj.locpick_coord = point;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment