I don't know if this is a bug or if I just don't understand how this
is supposed to work. I'm trying to set what mapTypes that will be
available in the mapTypeControl.
Here's the code I'm using for defining the MapOptions object.
// Creating a MVCArray that will contain the maptypes
// that will be available in mapTypeControl
var mapTypes = new google.maps.MVCArray();
mapTypes.push(google.maps.MapTypeId.HYBRID);
mapTypes.push(google.maps.MapTypeId.ROADMAP);
var options = {
zoom: 3,
center: new google.maps.LatLng(37.09, -95.71),
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: true,
mapTypeControlOptions: {
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU,
mapTypeIds: mapTypes
}
};
If I use the default mapTypeControl nothing is displayed and when I
change it to DROPDOWN_MENU it's displayed but only contains
"undefined".
Am I doing this wrong or is it a bug in the API?
Se the full example at http://www.svennerberg.com/test/mapTypeIds.html
Thanks!
Gabriel
--
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.