I've bumped into this myself writing a custom control. Currently I don't know of a way to be notified with the available map types change.
Chad Killingsworth On Jun 5, 6:36 am, Nianwei Liu <[email protected]> wrote: > yes but that code seems quite awkward, especially there is no direct > way to modify or even get the exisiting ids out. there were > discussions on another thread on workarounds but not really a > definitive way. > > The capabilty to not showing a maptype in control is new in v3 but it > seems a better way to specify this would be a flag or order index when > the maptype is added, instead of reset the whole control each time. > > On Jun 4, 5:42 pm, William <[email protected]> wrote: > > > > > I think you need to add any new map types to the map type control. > > This enables the developer to decide exactly which map types are > > available to the user, and what order they appear. So after defining > > the 'hiphop' map type, set new options on the map: > > > map.setOptions({ > > mapTypeControlOptions: { > > mapTypeIds: [ > > 'hiphop', > > google.maps.MapTypeId.ROADMAP, > > google.maps.MapTypeId.TERRAIN, > > google.maps.MapTypeId.SATELLITE, > > google.maps.MapTypeId.HYBRID > > ] > > } > > > }); -- 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.
