vendor/assets/javascripts/bhf/classes/Setlatlng.js in bhf-0.4.25 vs vendor/assets/javascripts/bhf/classes/Setlatlng.js in bhf-0.4.30
- old
+ new
@@ -37,20 +37,20 @@
title: 'Location',
draggable: true
});
if (latElem.value && lngElem.value) {
- marker.position = new google.maps.LatLng(latElem.value, lngElem.value);
+ marker.setPosition(new google.maps.LatLng(latElem.value, lngElem.value));
marker.setMap(map);
}
else {
if (navigator) {
navigator.geolocation.getCurrentPosition(function(e){
map.setCenter(new google.maps.LatLng(e.coords.latitude, e.coords.longitude));
});
}
google.maps.event.addListener(map, 'click', function(e){
- marker.position = e.latLng;
+ marker.setPosition(e.latLng);
marker.setMap(map);
setValues(marker.getPosition().lat(), marker.getPosition().lng());
google.maps.event.clearListeners(map, 'click');
});
}
\ No newline at end of file