On continue à adapter le template...
This commit is contained in:
@@ -189,7 +189,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div id="map" class="locationMap"></div>
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key={module_config module='PlanificationLivraison' key='googlemap_api_key' locale='en_US'}" async></script>
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key={module_config module='PlanificationLivraison' key='googlemap_api_key' locale='en_US'}"></script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
|
||||
function initMap() {
|
||||
|
||||
var opt = {
|
||||
center: new google.maps.LatLng($("#latitude").val(), $("#longitude").val()),
|
||||
zoom: 15,
|
||||
@@ -33,6 +34,7 @@
|
||||
marker = new google.maps.Marker({
|
||||
position: new google.maps.LatLng($("#latitude").val(), $("#longitude").val()),
|
||||
map: map,
|
||||
draggable: true,
|
||||
title: $(document.getElementById("title")).val()
|
||||
});
|
||||
}
|
||||
@@ -52,7 +54,8 @@
|
||||
resultsMap.setCenter(results[0].geometry.location);
|
||||
marker = new google.maps.Marker({
|
||||
map: resultsMap,
|
||||
position: results[0].geometry.location
|
||||
position: results[0].geometry.location,
|
||||
draggable: true
|
||||
});
|
||||
$("#latitude").val(results[0].geometry.location.lat);
|
||||
$("#longitude").val(results[0].geometry.location.lng);
|
||||
@@ -75,7 +78,7 @@
|
||||
if (typeof(google) !== 'undefined') {
|
||||
if (typeof initMap === "function")
|
||||
initMap();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user