On Mar 23, 9:04 am, Andy Newby <[email protected]> wrote:
> Hi,
>
> I'm trying to add a link on my page (outside of the map), so people can
> click on it, and it will then zoom in to the zoom level they set.
>
> So far I have:
>
> <a href="javascript: void(0);"
> onclick="map.setZoom(jQuery('#article_map_max_zoom_level').val());">Goto
> Zoom level</a>
>
> ..and a function:
>
>     function setZoomLevel(thelevel) {
>         alert("setting zoom to: " + thelevel);
>         map.setZoom(thelevel);
>     }    
>
> The number is being passed in fine (as its showing up on the alert()) ...
> BUT I get a JS error in the Error Consol in FF:
>
> Error: Invalid value for property <zoom>: 6

Another question (that we could answer for ourselves if you had
provided a link...)

Is the "6" above a number or a string?

  -- Larry


> Source File:http://maps.gstatic.com/intl/en_gb/mapfiles/api-3/4/6a/main.js
> Line: 26
>
> I'm guessing its cos I'm "outside" the function where "map" was defined...
> even though my code looks like:
>
> var map;
>     function initialize() {
>       ...code that sets the map uyp
>
>     }
>
> Is it possible to do what I'm trying to achieve? (I'm gussing it is, but I
> just don't know how ;))
>
> TIA!
>
> Andy

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to