On Jan 28, 2:02 pm, drtowery <[email protected]> wrote:
> is this close to what I'm looking for?
>
> function setZoom(level) {
> GEvent.addListener(marker, "click", function() {
>                 marker.setZoom(level);
>               });
>
> }
>
> Does this " marker.setZoom" need to be marker.setZoom, or map.setZoom?

The setZoom function is a function of the GMap2 object.  So it should
be the map.
You may want to "center and zoom in" on the marker

map.setCenter(marker.getLatLng(),(map.getZoom()+2));

But your map variable needs to be global (it is currently local to
your load function).

Change var map = ...
to map = ...

put "var map;"  just before your load function.
See Mike Williams' tutorial for a discussion of variable scope if you
are interested in why you need to do that:
http://www.econym.org.uk/gmap/scope.htm

 -- Larry


>
> On Jan 28, 3:46 pm, drtowery <[email protected]> wrote:
>
>
>
> >http://www.sappbrosts.com/dontesting/map/map2.html
>
> > On Jan 28, 3:45 pm, drtowery <[email protected]> wrote:
>
> > > yea, i've seen all the documentation, but I dont know how to code in
> > > javascript so it really doesnt mean anything to me.  this "setZoom
> > > (level:Number) " means nothing to me because I dont know where to
> > > place this in the script in conjunction with the listener.  Thats why
> > > i was looking for code that was already done so I could use it as a
> > > guide.  Unfortunately, there are no examples in the documentation that
> > > actually show you how to use the code which is why I am here looking
> > > for help.
>
> > > On Jan 28, 3:36 pm, "[email protected]" <[email protected]>
> > > wrote:
>
> > > > On Jan 28, 1:32 pm, drtowery <[email protected]> wrote:
>
> > > > > I've been searching the internet for the code, some has had to have
> > > > > done it before.  I saw a side bar with links earlier that would zoom
> > > > > in when the link was clicked, but I lost the page and havent been able
> > > > > to find it again.
>
> > > > Might I suggest the documentation?
> > > > A combination of these functions should allow you to achieve your
> > > > desired 
> > > > result:http://code.google.com/apis/maps/documentation/reference.html#GMap2.g......
>
> > > > or perhaps even:
> > > > map.zoomIn();
> > > > map.zoomIn();
>
> > > >   -- Larry
>
> > > > > On Jan 28, 3:30 pm, drtowery <[email protected]> wrote:
>
> > > > > > I want it to zoom in 2 levels when a user single clicks on a 
> > > > > > marker.- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to