Forum
Welcome, Guest
Ask all your version 2.0 questions here.
  • Page:
  • 1

TOPIC: Zoom Level

Zoom Level 2 years, 4 months ago #738

  • nicholas
  • OFFLINE
  • Moderator
  • Developing for Joomla since it was born!
  • Posts: 1197
The question came in about Zoom Level:

Im trying to find where the option is to set the zoom level of the map once the results are returned. Ive looked in the plugin settings, and can only find the option to change the map size, ive had a quick look at the code that we have to paste and couldnt find the details in there either?
Nicholas
CIO - CorFun, Inc.
Publisher - orthodoxbiz.com
Webmaster - Orthodox Christian Network

Re:Zoom Level 2 years, 4 months ago #739

  • nicholas
  • OFFLINE
  • Moderator
  • Developing for Joomla since it was born!
  • Posts: 1197
I'll let Jerry address this further. From the original forum, Jerry had given this code:

You had asked earlier about setting the map to be zoomed further out. There is a command in the API to set the default zoom level. I can give you the code, but we will not change our code. Also, I haven't tested this.
 
Here it is:
 
After the following line in ShowGoogleMap:
$sgmMap->setControlSize('
small');
Add this line:
$sgmMap->setZoomLevel(4);
 
The 4 is what they had in their example. You'
ll have to test what number works best for you.


Jerry, in the new package are the instructions the same?
Nicholas
CIO - CorFun, Inc.
Publisher - orthodoxbiz.com
Webmaster - Orthodox Christian Network

Re:Zoom Level 2 years, 4 months ago #740

  • jerry
  • OFFLINE
  • Moderator
  • Posts: 407
Yes, the code is the same. The only difference is that there are now two scripts that can produce the map. There is the ShowGoogleMap.php and ShowGoogleMapLatLong.php. Which script it uses is based on the Latitude/Longitude option of the plug-in.

Just make the change in both and you should be covered.

Jerry
  • Page:
  • 1
Moderators: jasper, nicholas, henry, jerry
Time to create page: 0.58 seconds

Login