Skip to content

Commit 8525aa4

Browse files
committed
Added draggable option to allow/disallow dragging
locationpicker has a new setting called draggable which can be used while initializing to enable or disable the dragging of the market. It will be quite handy in case if you want only place to be search or you want to enable it in certain condition.
1 parent e356e68 commit 8525aa4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

locationpicker.jquery.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
position: new google.maps.LatLng(54.19335, -3.92695),
1111
map: _map,
1212
title: "Drag Me",
13-
draggable: true
13+
draggable: options.draggable
1414
});
1515
return {
1616
map: _map,
@@ -226,7 +226,8 @@
226226
streetViewControl: false,
227227
radius: settings.radius,
228228
locationName: settings.locationName,
229-
settings: settings
229+
settings: settings,
230+
draggable: settings.draggable
230231
});
231232
$target.data("locationpicker", gmapContext);
232233
// Subscribe GMap events
@@ -259,6 +260,7 @@
259260
},
260261
enableAutocomplete: false,
261262
enableReverseGeocode: true,
263+
draggable: true,
262264
onchanged: function(currentLocation, radius, isMarkerDropped) {},
263265
onlocationnotfound: function(locationName) {},
264266
oninitialized: function (component) {}

0 commit comments

Comments
 (0)