Hierarchical Map Types in Google Maps JavaScript API v3
I am using Google Maps JS API v3 to display several custom map types. I would like to group them in the same way Roadmap/Terrain and Satellite/Hybrid are displayed: as sub-maps of one map.
开发者_开发技巧This was possible in the v2 of the API by using GHierarchicalMapTypeControl. However, I can't seem to find any equivalent in v3. Is there a way to achieve this with v3? If not, do you know if there are any plans of supporting it in the near future?
I suggest writing a custom control (see http://code.google.com/apis/maps/documentation/javascript/controls.html)
Custom controls are just HTML elements, so you could use jQuery or similar to create any UI you want.
If you want them to look like the existing controls, the CSS for that is available in this example:
http://code.google.com/p/gmaps-samples-v3/source/browse/trunk/controls/index.html?spec=svn243&r=243
精彩评论