Dropzone edit opction adadded.

This commit is contained in:
Naida Vatric
2020-03-24 11:10:16 +01:00
parent 477424caa1
commit 3fa9804ca6
24 changed files with 9400 additions and 256 deletions

View File

@@ -108,7 +108,7 @@
//Move map and marker to already selected position if in editing mode
if( editingRealEstate===true) {
console.log('Editujem mapu!');
setMarkerToLocation(map);
setMarkerToLocation(map, editingRealEstate);
}
//Add event listener to position marker on map
@@ -132,11 +132,15 @@
}
}
function setMarkerToLocation(map) {
const ESTATE_COORDINATES = {
const ESTATE_COORDINATES = ( <%= locationLat %> !==0 && <%= locationLong %> !== 0 ) ?
{
lat: <%= locationLat %>,
lng: <%= locationLong %>
}:
{ lat: 43.85, //Set to Sarajevo if coordinates are not picked
lng: 18.41
};
marker = new google.maps.Marker({
position: ESTATE_COORDINATES,
map: map,