Class MVOverviewMap
MVOverviewMap defines an overview map that displays the miniature overview of the main map as a small rectangle inside itself. The overview map is usually displayed inside a small HTML DIV element, whose size and position can be customized. The overview map can also be placed inside a collapsible map decoration. As the result, the user can hide or display the overview map by minimize or restore the map decoration.
The overview map always displays maps that are zoomed out from the main map. By default, the overview map and the first(bottom) main base map layer are rendered by the same map tile layer. If different map tile layer are used, they must be defined in the same coordinate system and have the same zoom level definition.
The following code snippet adds an overview map inside a map decoration.md = new MVMapDecoration(new MVOverviewMap(4),null,null,200,150) ; md.setCollapsible(true, true); mapview.addMapDecoration(md);The following code snippet adds an overview map inside a DIV container outside the map.
var overviewMapContainer = document.getElementById("overview_map"); var over=new MVOverviewMap(overviewMapContainer,4); mapview.addOverviewMap(over) ;
Constructor Attributes | Constructor Name and Description |
---|---|
MVOverviewMap(overviewMapDIV, zoomdiff, overviewMapTileLayer)
|
Method Attributes | Method Name and Description |
---|---|
This method gets the map tile layer configuration object of the overview map.
|
|
This method gets the current zoom level of the overview map.
|
|
setMouseCursorStyle(cursorStyle, cursorType)
This method sets the mouse cursor style when the mouse is inside the overview map.
|
|
setRectangleStyle(borderStyle, fillColor)
This method sets the style of the small rectangle that represents the
main map inside the overview map.
|
- Parameters:
- {DIV} overviewMapDIV
- the HTML DIV element inside which the overview map is displayed. This parameter should be set to null or omitted when the overview map is to be displayed inside a map decoration object.
- {int} zoomdiff
- an integer that specifies the zoom level difference between the overview map and the main map.
- {String} overviewMapTileLayer
- an optional String parameter that specifies the map tile layer to be used by the overview map. If omitted, the first map tile layer added to the MVMapView instance is used the overview map.
- Returns:
- The map tile layer configuration object of the overview map.
- Returns:
- {int} The overview map zoom level.
- Parameters:
- {String} cursorStyle
- A string that specifies the cursor style to be used, which must be one of the standard CSS cursor style names such as "crosshair", "pointer" and "move".
- {String} cursorType
- A string that specifies when the cursor style
should be used. Its value can be one of the following:
- "default" Cursor style to be used when the mouse is on the map and no mouse key has been pressed.
- "dragging" Cursor style to be used when the map is being dragged.
- Returns:
- None
- Parameters:
- {String} borderStyle
- a String that specifies the border style(color and width) of the rectangle. The style should be defined using the standard HTML/CSS style syntax. The default style is "2px solid red".
- {String} fillColor
- a String that specifies the fill color of the rectangle. The fill color should defined as a valid HTML/CSS color style, such as red, blue, green or #aaaaaa. The default background color is "red"
- Returns:
- None