Dropzone edit opction adadded.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user