View Full Version : Center Map
drew104744
07-09-2009, 05:25 AM
I have been searching the forum to find out how and where to place the code to center the map onload, I have found a few post but they are incomplete. https://www.webassist.com/forums/showthread.php?t=952
Where in the page ( wagmp_map_1.php ) do we need to add the code and is this the right code
goole.maps.setCenter(center:38.3176830 -88.9037070, zoom:Number) ;
or does it need to be
map.setCenter(center:38.3176830 -88.9037070, zoom?:Number, type?:GMapType); what is the map type, does the Long and Lat need to be seperated by a comma
drew104744
07-09-2009, 06:18 AM
I have also tried to use Lytebox and ThickFrame to link information from the info windows and it works onload but then will just go to the page that is to open in the lytebox or thickframe, is there any reason that this would happen.
http://mvpd.dstubblefield.com/modules/sex_offenders/index.php
This is for a police dept and they are wanting to show all the perv's in the area
I have attached the files, the path to the Google map is modules/sex_offenders
Ray Borduin
07-09-2009, 08:13 AM
Just update the line:
map.setCenter(point, 13);
play around with the 13... that is the zoom level. Increase or decrease until you find the level you want.
drew104744
07-09-2009, 08:28 PM
Thanks for the response on the set center, that gave me a start and this is what I found worked: map.setCenter(new GLatLng(38.3176830, -88.9037070), 11);
Is there any ideas why, I can't get the lyteframe to work off the map, as you can see from the list below the map I can get it to work from a repeat region, but not the map.
http://mvpd.dstubblefield.com/modules/sex_offenders/index.php
Ray Borduin
07-10-2009, 08:12 AM
I'm not familiar with lyteframe, but it appears you are using the same syntax for the links so it must have something to do with how lyteframe works.
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.