Class MVNavigationPanel
MVNavigationPanel defines a map navigation panel that is to be displayed
inside a map decoration(MVMapDecoration). The visibility and positioning of the
scale bar is determined by the map decoration that holds the scale bar. An existing
navigation panel can be removed by removing the correspondind map decoration
object from the map.
The default navigation panel has a zoom level bar that can be dragged to change
map zoom level, a zoom in button, a zoom out button and 8-direction panning buttons.
Typical usage of this class is illustrated below.
var md=new MVMapDecoration(new MVNavigationPanel(),0 ,0 , null, null, 4, 4); mapview.addMapDecoration(md);
Constructor Attributes | Constructor Name and Description |
---|---|
MVNavigationPanel(panningButtonNumber, zoomingBar, zoomingButtons, zoomLevelBars)
|
Method Attributes | Method Name and Description |
---|---|
enableZoomLevelInfoTips(enabled)
This method enables or disables the tips of zoom level information.
|
|
setNavPosition(direction)
This method set the position of navigation panel,
|
|
setZoomLevelInfoTips(infoTips, style)
This method add labels to the zooming bar.
|
Class Detail
MVNavigationPanel(panningButtonNumber, zoomingBar, zoomingButtons, zoomLevelBars)
- Parameters:
- {int} panningButtonNumber
- an integer that specifies the number of directional panning buttons, which can be 0, 4 or 8.
- {boolean} zoomingBar
- a boolean this parameter specifies whether to display the zooming bar on the navigation panel.
- {boolean} zoomingButtons
- a boolean this parameter specifies whether to display the zooming buttons(+/-) on the navigation panel.
- {boolean} zoomLevelBars
- a boolean this parameter specifies whether to display the zoom level bars on the navigation panel.
Method Detail
{void}
enableZoomLevelInfoTips(enabled)
This method enables or disables the tips of zoom level information. If it is enabled,
the zoom level tips is displayed When you hover over the zooming bar.
- Parameters:
- {Boolean} enabled
- enabled is a Boolean true (enable the display of zoom level info tip) or false (disable the display of zoom level info tip).
- Returns:
- None
{void}
setNavPosition(direction)
This method set the position of navigation panel,
- Parameters:
- {string} direction
- is a string that specifies the position of navigation panel, the value should be "west" or "east"
- Returns:
- None
{void}
setZoomLevelInfoTips(infoTips, style)
This method add labels to the zooming bar. When you hover over the zooming bar,
you will see all the layers and the tips of these layers.
These labels aid users in understanding the layer levels.
- Parameters:
- {string} infoTips
- is a sparse array/object that specifies the info tips to be displayed for the zoom levels. Here is an example. {1:"Country", 3:"State", 5:"County", 7:"City", 10:"Street"}
- {string} style
- is a css style string that specifies the style of the i nfo tip text. .
- Returns:
- None