On Aug 3, 6:42 am, Greg45 <gre...@gmail.com> wrote: > Yeah !! very good !! Now, I know how make a global variable ! :) > > All my script work fine with your help ! many thx !! :) > > In your code for zoom, I want to add an another script. > > just for change the mapTypeID when i zoom in and come back in zoom > out, > > <a href='javascript:map.setCenter(new > google.maps.LatLng("+point.toUrlValue(6)+")); > map.setmapTypeId(SATELLITE); map.setZoom("+ zoom +");'>Zoom !</a>"; > > but they don't work do you have an idea ?
What I usually do is if I want to do something I haven't done before (and I haven't done a lot with the Google Maps API v3 yet...) is look at the documentation: http://code.google.com/apis/maps/documentation/javascript/reference.html#Map There is no map.setmapTypeId function that I can see listed (javascript is case sensitive). I would expect your browser would give you a very informative javascript error. Have you tried the documented function (setMapTypeId)? -- Larry > > On Aug 3, 2:31 pm, "geocode...@gmail.com" <geocode...@gmail.com> > wrote: > > > > > On Aug 3, 1:40 am, Greg45 <gre...@gmail.com> wrote: > > > > Don't know wHere put my var map, for make it Global . > > > I gave you an example. You could also look at this description from > > Mike Williams' (v2) tutorial: > > Javascript Concepts - Part 1 Scopehttp://econym.org.uk/gmap/scope.htm > > > You need to remove the "var" keyword from the statement that > > initializes it in your function (leaving that statement where it is), > > and then declare the variable in the global scope (outside of any > > function). > > > -- Larry > > > > ps : sorry- Hide quoted text - > > - Show quoted text - -- 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 google-maps-js-api...@googlegroups.com. To unsubscribe from this group, send email to google-maps-js-api-v3+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.