Class MVMapTileLayer
MVMapTileLayer defines a map tile layer displayed on the client side. It assembles and displays pregenerated map image tiles that are rendered by the map tile server and belong to a pre-defined server side map tile layer.
The map tile server is a servlet running as part of the MapViewer server. The typical map tile server URL is http://hostname:port/mapviewer/mcserver.
Constructor Attributes | Constructor Name and Description |
---|---|
MVMapTileLayer(mapTileLayerName, tileServerURL)
|
Method Attributes | Method Name and Description |
---|---|
This method gets the map type of a server side defined built-in tile layer, such as Google tile layer,
bing tile layer and Yahoo tile layer.
|
|
This method gets the visibility of the map tile layer.
|
|
refresh(reuseBrowserCache)
This method reloads all map tiles currently displayed from the server.
|
|
setCombinable(combinable)
This method sets whether the tile layer is combinable.
|
|
This method sets map type of a server side defined built-in tile layer, such as Google tile layer,
bing tile layer and Yahoo tile layer.
|
|
This method sets opacity of tile layer image.
|
|
setTransparent(transparent)
This method sets whether the background color of the map images from
the map tile layer is transparent.
|
|
setVisible(visible)
This method sets the visibility of the map tile layer.
|
|
setVisibleZoomLevelRange(minLevel, maxLevel)
This method sets the min level and max level.The map tile layer will be visible only as the
zoom level between them.
|
- Parameters:
- {String} mapTileLayerName
- mapTileLayerName is a string that identifies the map tile layer. It is defined in the form of data-source-name.map-tile-layer-name, where map-tile-layer-name specifies the name of the map tile layer that has been pre-defined on the server side and data-source-name specifies the name of the MapViewer data source in which the map tile layer is defined.
- {String} tileServerURL
- tileServerURL is a string that specifies the URL of the map tile server, which should be in the form http://host:port/mapviewer/mcserver. This is an optional parameter. When omitted, the map tile server URL is derived from the MapViewer base URL specified when creating the MVMapView object.
- Returns:
- The newly created MVMapTileLayer object.
- Returns:
- Map type
- Returns:
- true if the map tile layer is currently visible, false if the map tile layer is not currently visible.
- Parameters:
- {Boolean} reuseBrowserCache
- It specifies whether to reuse tiles cached in the local browser cache.
- Returns:
- None
A combinable tile layer can be combined with other combinable tile layer(s) when a) they are adjacent to each other in the tile layer stack, b) they are served by the same MapViewer server and c) they have the same zoom level and coordinate system definition.
When being combined, multiple tile layers will be combined and merged into one by MapViewer server and displayed in fact by the client as one tile layer. In other words, at any give location within the map, instead of fetching and overlaying multiple tile images belonging to multiple tile layers in the browser, the client asks MapViewer server to merge these multiple tiles into one tile image and displays the merged tile image intead.
When there are many tile layers, combining multiple tile layers into one can greatly reduce the number of tile images fetched and displayed by the client and hence improve client side map rendering performance. A tile layer is not combinable by default.
- Parameters:
- {Boolean} combinable
- True if the map tile layer can be combined with other tile layer(s).
- Returns:
- None
- Parameters:
- {int} type.
- The parameter specifies the map type.
- Returns:
- None
- Parameters:
- {int} opacity.
- The parameter opacity should be a number between 0 and 1.
- Returns:
- None
- Parameters:
- {Boolean} transparent
- True if the map images background is transparent.
- Returns:
- None
- Parameters:
- {Boolean} visible
- visible is a Boolean true (make the map tile layer visible) or false (make the map tile layer not visible).
- Returns:
- None
- Parameters:
- {Integer} minLevel
- It specifies the min level.The map tile layer will not be visible if the zoom level is lower than it.
- {Integer} maxLevel
- It specifies the max level.The map tile layer will not be visible if the zoom level is higher than it.
- Returns:
- None