OS Property support center

Google map zoom on Property Listing Layout

More
11 years 2 months ago #42973 by Tami
Is there a way to set the map zoom level on the Property Listing Layout?
I'm open to a hack.
Attachments:

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #42981 by Mr. Dam
Replied by Mr. Dam on topic Google map zoom on Property Listing Layout
Hi,
We can't set the zoom level of Google map in the list of properties page. Because the system will generate the Zoom level of Google map automatically to fit all the places on the map.
But you can limit the zoom level of the Google at the list of properties page by modifying file
components > com_osproperty > helpers > googlemap.lib.php
function: loadMapInListing
see this code
var listener = google.maps.event.addListener(map, "idle", function() {
if (map.getZoom() > 16) map.setZoom(16);
google.maps.event.removeListener(listener);
});
In above code, if the zoom level of map is higher than 16, the system will limit the value to 16 only. So you can change to another value if you need.
Thanks
Dam

Please Log in or Create an account to join the conversation.

Moderators: Mr. DamNguyen Phu Quan