Skip to content
Snippets Groups Projects
Commit 8a02ec8d authored by Logaritmisk's avatar Logaritmisk Committed by Andriy Podanenko
Browse files

Issue #1847676 by logaritmisk: Fixed No initial marker when using locpick.

parent 552e8ae0
No related branches found
No related tags found
No related merge requests found
...@@ -11,8 +11,8 @@ Drupal.gmap.addHandler('gmap', function (elem) { ...@@ -11,8 +11,8 @@ Drupal.gmap.addHandler('gmap', function (elem) {
var obj = this; var obj = this;
var binding = obj.bind("locpickchange", function () { var binding = obj.bind("locpickchange", function () {
if (obj.locpick_point && obj.locpick_coord) { if (obj.locpick_coord) {
obj.locpick_point.setPosition(obj.locpick_coord); google.maps.event.trigger(obj.map, "click", { 'latLng': obj.locpick_coord });
} }
}); });
...@@ -33,7 +33,7 @@ Drupal.gmap.addHandler('gmap', function (elem) { ...@@ -33,7 +33,7 @@ Drupal.gmap.addHandler('gmap', function (elem) {
if (event) { if (event) {
if (!obj.locpick_point) { if (!obj.locpick_point) {
obj.locpick_point = new google.maps.Marker({ obj.locpick_point = new google.maps.Marker({
position: event.latLng, position: event.latLng,
map: obj.map, map: obj.map,
draggable: true draggable: true
}); });
......
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