- Posts: 17
- Thank you received: 0
OS Property support center
Zoom for google map in Locator Search
- Qtal
- Topic Author
- Offline
- New Member
-
Less
More
11 years 6 months ago #36417
by Qtal
Zoom for google map in Locator Search was created by Qtal
where is the google zoom for layout: Locator Search?
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13025
- Thank you received: 1692
11 years 6 months ago #36428
by Mr. Dam
Replied by Mr. Dam on topic Re: Zoom for google map in Locator Search
Hi,
In locator Search, we don't have the default google zoom pre-defined, because the system will auto-adjust the zoom level of on the map to make all the properties can be seen on the Google map.
Thanks
Dam
In locator Search, we don't have the default google zoom pre-defined, because the system will auto-adjust the zoom level of on the map to make all the properties can be seen on the Google map.
Thanks
Dam
Please Log in or Create an account to join the conversation.
- Zucom
- Offline
- New Member
-
Less
More
- Posts: 9
- Thank you received: 0
11 years 6 months ago #36957
by Zucom
Replied by Zucom on topic Re: Zoom for google map in Locator Search
I've been looking for an answer to this as sometimes we only have one property in a category and the map just shows a grey screen as the zoom level is 1.
Is there an override?
Is there an override?
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13025
- Thank you received: 1692
11 years 6 months ago #36962
by Mr. Dam
Replied by Mr. Dam on topic Re: Zoom for google map in Locator Search
Hi,
The map in OS Property will adjust the zoom level automatically depend on number properties and distance between them. So we can't setup the zoom level for each case. Even we have 1 property in the map
Thanks
Dam
The map in OS Property will adjust the zoom level automatically depend on number properties and distance between them. So we can't setup the zoom level for each case. Even we have 1 property in the map
Thanks
Dam
Please Log in or Create an account to join the conversation.
- Zucom
- Offline
- New Member
-
Less
More
- Posts: 9
- Thank you received: 0
11 years 6 months ago #36968
by Zucom
Replied by Zucom on topic Re: Zoom for google map in Locator Search
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13025
- Thank you received: 1692
11 years 6 months ago #36970
by Mr. Dam
Replied by Mr. Dam on topic Re: Zoom for google map in Locator Search
Hi,
In fact, you can change the zoom level in Google map that having 1 property.
Please follow these steps:
1. Open file
components > com_osproperty > helpers > googlemap.lib.php
2. find
map.fitBounds(bounds); line 515
and add code:
var listener = google.maps.event.addListener(map, "idle", function() {
if (map.getZoom() > 16) map.setZoom(16);
google.maps.event.removeListener(listener);
});
bellow that line
Good luck
Dam
In fact, you can change the zoom level in Google map that having 1 property.
Please follow these steps:
1. Open file
components > com_osproperty > helpers > googlemap.lib.php
2. find
map.fitBounds(bounds); line 515
and add code:
var listener = google.maps.event.addListener(map, "idle", function() {
if (map.getZoom() > 16) map.setZoom(16);
google.maps.event.removeListener(listener);
});
bellow that line
Good luck
Dam
Please Log in or Create an account to join the conversation.
- Zucom
- Offline
- New Member
-
Less
More
- Posts: 9
- Thank you received: 0
11 years 6 months ago #36971
by Zucom
Replied by Zucom on topic Re: Zoom for google map in Locator Search
Thanks again for the reply but it white screens the web site. In my googlemap.lib.php line 515 is:
var bounds = new google.maps.LatLngBounds();
I have searched for map.fitBounds(bounds); and it is on line 633 and 1029.
I have tested by pasting the code below 515, 633 and 1029 and on 633 I have also pasted below the } which is on line 635.
Are you looking at the same version as me?
OSProperty 2.3.
Thanks.
var bounds = new google.maps.LatLngBounds();
I have searched for map.fitBounds(bounds); and it is on line 633 and 1029.
I have tested by pasting the code below 515, 633 and 1029 and on 633 I have also pasted below the } which is on line 635.
Are you looking at the same version as me?
OSProperty 2.3.
Thanks.
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13025
- Thank you received: 1692
11 years 6 months ago #36972
by Mr. Dam
Replied by Mr. Dam on topic Re: Zoom for google map in Locator Search
Hi,
Please copy source code in code.txt and replace in google.lib.php
Thanks
Dam
Please copy source code in code.txt and replace in google.lib.php
Thanks
Dam
- Zucom
- Offline
- New Member
-
Less
More
- Posts: 9
- Thank you received: 0
11 years 6 months ago #36973
by Zucom
Replied by Zucom on topic Re: Zoom for google map in Locator Search
I've tried it but I get a white screen for the whole site.
Any other ideas?
Any other ideas?
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13025
- Thank you received: 1692
11 years 6 months ago #36974
by Mr. Dam
Replied by Mr. Dam on topic Re: Zoom for google map in Locator Search
If you have the backup file of google.lib.php, please remove it or please do not put it in the same folder with modified file.
Thanks
Dam
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.