I tried to lock the position of the map by adding the property:
draggable: false
but it did not work, so how do I lock the position of the map. I only want them to move around the map and marker, and zoom in on another screen.
Thanks
I tried to lock the position of the map by adding the property:
draggable: false
but it did not work, so how do I lock the position of the map. I only want them to move around the map and marker, and zoom in on another screen.
Thanks
Hello Addy,
Please detail how do you add this property? Should be like this:
Вот так должно работать:
codevar map = new google.maps.Map(document.getElementsByName("multiGoogleMap")[0], {
zoom: 5,
center: new google.maps.LatLng((maxLatitude + minLatitude) / 2, (maxLongitude + minLongitude) / 2),
draggable: false,
mapTypeId: google.maps.MapTypeId.ROADMAP
});/code
where multiGoogleMap is the name of map component
I added it to the component on the UI. I did not do any code.
The address is loaded via the database. How would I add this to the Add JS part in the mapping ?
$(this).prop('draggable', 'false');
I tried this:
element.options({'draggable' : false});
but got an error about the object not being a function
Addy,
Please clarify how are you going to add location from your DB?
Like in this tutorial:
http://devcenter.appery.io/tutorials/... ?
If the answer is yes, than you can add this property when map is initialized (step No13 in tutorial)