This class lets you add a control to the map which looks like the typical GMapTypeControl from the obfuscated API. By specifying additional options you can also add additional buttons: a More...Button, a Traffic button and a drop-down legend for that button, and buttons to save the map position. It extends GControl.
Constructor | Description |
---|---|
ExtMapTypeControl(opt_options) | Creates an ExtMapTypeControl with the specified option hash (optional). |
Instances of this class are used in the opts_options
argument to the constructor of the
ExtMapTypeControl
class. There is no constructor for this class.
Instead, this class is instantiated as a javascript object literal.
From the following two properties only one should be used.
Properties | Type | Description |
---|---|---|
showMapTypes | Boolean | If set to true, Map Type buttons will be created by ExtMapTypeControl. |
posRight | Integer | If you want to create Map Type Buttons using GMapTypeControl, GHierarchicalMapTypeControl, GMenuMapTypeControl, or setUIToDefault instead, this option should be used to specify an appropriate position for the further buttons. The integer value defines the spacing of first displayed button from the right map border. |
All further properties are optional.
Properties | Type | Description |
---|---|---|
showTraffic | Boolean | If set to true, Traffic button will appear to left of other buttons. |
showTrafficKey | Boolean | If this option and showTraffic are set to true, a "?" button will appear next to Traffic button, and show a drop-down legend when clicked. |
showMore | Boolean | If set to true, a More...Button will be shown to display additional layers. |
showSave | Boolean | If set to true, two further buttons will be shown: one to save the actual position of the map and another to return to it. |