On Apr 5, 10:18 pm, Ovid <[email protected]> wrote: > Hi, I have a website with a google map page. I call a function, > showMap(), that passes a point for the map center and a zoom level. > > The one thing I can't seem to pass is the map type. In the script I > call map.setCenter as below: > > map.setCenter(point, MagLevel, G_SATELLITE_TYPE);
There is no such thing as G_SATELLITE_TYPE http://code.google.com/apis/maps/documentation/reference.html#GMapType.G_SATELLITE_MAP > > where pointOffset is my point and MagLevel is the zoom level. But, > I'd like to be able to pass either "G_SATELLITE_TYPE" or > "G_NORMAL_MAP" or "G_NORMAL_MAP". Putting a string in the function > doesn't work. Nope. It isn't a string it is a javascript object. map.setCenter(pointOffset, MagLevel, someString) gives > me an error. > > I want to be able to call my function as so: > showMap(lat, lng, magLevel, map-type), for example: > > showMap (50.5, 45.1, 10, "G_SATELLITE_TYPE") > > how do I pass a variable to map.setCenter such that it replaces the > variable with the text of the variable "inline", as it were? Why can't you just pass the right thing? You could do it like I do here: http://www.geocodezip.com/GenericMapBrowser.asp?filename=F18CrashSite081208.xml&type=sat -- Larry > > thanks, > > Ben --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
