PDA

View Full Version : Set Zoom Level?


craig380901
05-29-2009, 11:04 AM
I am new to google maps but can hack my way around a bit.

I am trying to get the map to zoom out to a specific point where I can see a bunch of property locations within a 15 mile radius of NYC. I have tried setZoom(x) in the wagmp_map_1() function as map.setZoom(10); but the map displays nothing. Is this correct location or do I need to setCenter first?

Thanks neat product so far.

Ray Borduin
05-29-2009, 11:15 AM
Do you have a sample url I can look at. I can take a look and see what I can see.

craig380901
05-29-2009, 11:22 AM
Thanks for the quick response.

http://www.rentthebronx.com/bronx-map.html

Although I have taken the code out at this point.

Update: helps to read the docs:) - although I still don't seem to be zooming out...

Ray Borduin
05-29-2009, 12:01 PM
map.setZoom();

should be right... where are you adding it?

try adding it right after: marker_5.openInfoWindowHtml(address_5.infowindowte xt);

craig380901
05-29-2009, 12:05 PM
I read the docs and it says to add setZoom after each instance of map.addOverlay? Sort of had it working. But can I just add it once?

Thanks!

craig380901
06-01-2009, 11:20 AM
Back again this time I am using the recordset method of displaying address, no problem there. Just wondering how I can adjust the zoom level to see a wider view of these locations, and I assume I may need to adjust the center location as well.

Here is a new link

http://www.rentthebronx.com/map.asp

Thanks!

Ray Borduin
06-01-2009, 11:35 AM
It seems like you could add the .setZoom call after the last instance of .addOverlay and it should work.

craig380901
06-01-2009, 12:01 PM
I get mixed results... Seems whatever value I put in I either get a view from outer space or no change at all... odd any ideas? Another thing is the map will not load at all in IE6 even before the change.


Thanks!

zuffster370186
07-06-2009, 07:55 PM
I have applied all code changes that are on this thread and the online documentation. The code that my page now displays has the setZoom() code after the map.addOverlay lines.

IE 8 is showing this 'Error on page':

Line: 1599
Char 1
Error: 'wagmp_map_3_obj.getPointByAddress(...)marker' is null or not an object

Safari also has a problem with the zoom just like IE. On Firefox, everything works great. I am assuming this is a browser conflict with the code.

In IE and Safari, with the zoom set to 14, I am still getting the view from Space.

http://rebels-baseball.com/fields.php

Ray Borduin
07-07-2009, 07:59 AM
Please download and install the latest version of promaps. I believe you are experiencing some issues we have recently corrected that may account for at least some of the problems you are having.

Let me know once you have updated with the latest version and I can look into it further with you if necessary.

zuffster370186
07-10-2009, 01:21 PM
Please download and install the latest version of promaps. I believe you are experiencing some issues we have recently corrected that may account for at least some of the problems you are having.

Let me know once you have updated with the latest version and I can look into it further with you if necessary.
Ray, I already had the 1.05 version installed before I began messing with Google Promaps. I believe 1.05 is the latest.

Ray Borduin
07-10-2009, 01:53 PM
Have you regenerated your map with the most recent version installed? I think the code may have been generated with the older version? no?

zuffster370186
07-11-2009, 10:04 AM
Ray, when WA came out with latest Promaps for Google fix v.1.05, I hadn't even come to that point of putting Promaps in my web page. So, when I first began using the Promaps extension for the first time, I used the most current and updated version (1.05). Today, I disabled the extension completely, and then deleted the mxp file in the adobe extension's folder. I then downloaded the extension again and reactivated it. I also deleted all promap files within the file system of my website and started over again. When I added promaps to my web page again, I got the same result as last time. I then added the small code as explained in the WA "How to's". Firefox works great but not with the latest Safari or IE(8).

Ray Borduin
07-13-2009, 08:35 AM
Please post a support incident and we can have someone look into this with you directly.

Brainthief
08-19-2009, 01:25 PM
Im trying to set the zoom and have read these posts but Im confused...
can you give me a link to the final fix for setting the zoom?
Thanks,
Guy

Ray Borduin
08-19-2009, 03:37 PM
To set the zoom on a map you can typically adjust the line of code in the .js:

map.setCenter(point, 13);

the number 13 is the default zoom level, just replace it with other numbers and it will change the zoom level.