Class: imageMapLayer

L.supermap.imageMapLayer

The image map layer class. Instances of this service are used to display data from a web accessible image as a map layer.

L.supermap.imageMapLayer(url, options)

ImageMapLayer.js, line 5
Name Type Description
url string

The url of the image layer,eg:http://localhost:8090/iserver/services/map-china400/rest/maps/China.

options Object

The optional parameters of image layer.

Name Type Default Description
layersID string optional

Get the map layer ID to be sliced, which is the layer that specifies the slice of the map. It can be a temporary layer set or a combination of layers in the current map.

redirect boolean false optional

Whether redirect or not. If true, the request is redirected to the real URL of the tile. If false, the response body is a byte stream of the tile.

transparent boolean true optional

Whether the tiles are transparent.

cacheEnabled boolean true optional

Weather cache is enabled.

clipRegionEnabled boolean false optional

Whether map clipping is enabled.

clipRegion L.Path optional

The map shows the cropped area. This parameter is a polygon object and valid when clipRegionEnabled = true. the map only shows the part covered by the area.

prjCoordSys Object optional

The coordinate reference system for the requested map. For instance: prjCoordSys={"epsgCode":3857}.

overlapDisplayed boolean false optional

Whether it is overlapped when map objects are in the same range.

overlapDisplayedOptions string optional

The filter options for avoiding overlapped display of map objects.

opacity number 1 optional

Layer opacity.

alt string optional

The alternate text is displayed when the image cannot be displayed.

pane string 'tilePane' optional

The grouping of the map DOM to which the layer belongs.

interactive boolean false optional

Whether to respond to mouse clicks or hover interaction events.

crossOrigin boolean false optional

Whether to set cross-domain properties.

errorOverlayUrl string optional

Replaces the displayed tile address when the layer fails to load.

zIndex number 1 optional

Set the level of the layer.

className string optional

Customize the className of the dom element.

serverType SuperMap.ServerType SuperMap.ServerType.ISERVER optional

Type of server iServer|iPortal|online.

updateInterval number 150 optional

The layer delays the refresh interval when panning.

tileProxy string optional

Enable managed addresses.

format string 'png' optional

The tile representation type supports four expression types "png", "bmp", "jpg" and "gif".

attribution string 'Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' title='SuperMap iServer' target='_blank'>SuperMap iServer</a></span>' optional

The copyright information.

Fires
Example
L.supermap.imageMapLayer(url).addTo(map);

Extends

Events

error

ImageMapLayer.js, line 317

Triggered after the request layer failed to load.

load

ImageMapLayer.js, line 304

Triggered after the requested layer is loaded.

Properties:
Name Type Description
bounds L.bounds

Layer bounds。

loading

ImageMapLayer.js, line 324

Triggered in request layer loading.

Properties:
Name Type Description
bounds L.bounds

Layer bounds。

Methods

bringToFront()

ImageMapLayer.js, line 127

Top the current layer.

bringToFront()

ImageMapLayer.js, line 139

Set the current layer to the bottom.

getImageUrl(){string}

ImageMapLayer.js, line 172

Get the image layer request address, Subclasses can override implementations.

Returns:
Type Description
string Request tile address.

getOpacity(){number}

ImageMapLayer.js, line 151

Get layer transparency.

Returns:
Type Description
number The transparency of the layer.

setOpacity()

ImageMapLayer.js, line 160

Set the transparency.

update()

ImageMapLayer.js, line 333

Update the layer.