- Posts: 5
- Thank you received: 0
OS Property support center
Google map zoom on Property Listing Layout
- Tami
- Topic Author
- Offline
- New Member
-
Less
More
11 years 2 months ago #42973
by Tami
Google map zoom on Property Listing Layout was created by Tami
- Mr. Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13059
- Thank you received: 1696
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
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. Dam, Nguyen Phu Quan
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.