Class: Tianditu

ol.source.Tianditu

The source of Tianditu.

new ol.source.Tianditu(opt_options)

Tianditu.js, line 3
Name Type Description
opt_options Object

The optional parameters.

Name Type Default Description
url string 'http://t{0-7}.tianditu.com/{layer}_{proj}/wmts?' optional

The url of the service.

layerType string 'vec' optional

The layer type (vec: vector layer, img: image layer, ter: terrain layer).

cacheSize number 2048 optional

The cache size.

tileLoadFunction function optional

Administer the function when tile loaded.

style string optional

The layer style.

format string 'tiles' optional

The format.

isLabel boolean optional

Whether to use label layer.

opaque boolean true optional

Whether it is transparent or not

tileProxy string optional

Proxy url.

attributions string 'Map Data <a href='http://www.tianditu.com' target='_blank'><img style='background-color:transparent;bottom:2px;opacity:1;' src='http://api.tianditu.com/img/map/logo.png' width='53px' height='22px' opacity='0'></a> with <span>© <a href='https://iclient.supermap.io' target='_blank'>SuperMap iClient</a></span>' optional

The copyright information.

Extends

  • ol.source.WMTS

Methods

ol.source.Tianditu.default3857TileGrid(){ol.tilegrid.WMTS}

Tianditu.js, line 119

Get default 3857 tile grid.

Returns:
Type Description
ol.tilegrid.WMTS Return the default 3857 tile grid.

ol.source.Tianditu.default4326TileGrid(){ol.tilegrid.WMTS}

Tianditu.js, line 97

Get default 4326 tile grid.

Returns:
Type Description
ol.tilegrid.WMTS Return the default 4326 tile grid.

ol.source.Tianditu.getTileGrid(projection){ol.tilegrid.WMTS}

Tianditu.js, line 83

Get tile grid.

Name Type Description
projection Object

Projection reference system.

Returns:
Type Description
ol.tilegrid.WMTS Return the tile grid.