Class: WebMap

WebMap

对接 iPortal/Online 地图类

new ol.supermap.WebMap(options)

openlayers/mapping/WebMap.js, line 71
Name Type Description
options Object

参数

Name Type Default Description
target string 'map' 可选

地图容器id

webMap Object | string 可选

webMap对象,或者是获取webMap的url地址。存在webMap,优先使用webMap, id的选项则会被忽略

id number 可选

地图的id

server string "https://www.supermapol.com" 可选

地图的地址,如果使用传入id,server则会和id拼接成webMap请求地址

successCallback function 可选

成功加载地图后调用的函数

errorCallback function 可选

加载地图失败调用的函数

credentialKey string 可选

凭证密钥。例如为"key"、"token",或者用户自定义的密钥。用户申请了密钥,此参数必填

credentialValue string 可选

凭证密钥对应的值,credentialKey和credentialValue必须一起使用

withCredentials boolean false 可选

请求是否携带 cookie

excludePortalProxyUrl boolean 可选

server传递过来的url是否带有代理

serviceProxy Object 可选

iportal内置代理信息, 仅矢量瓦片图层上图才会使用

tiandituKey string 可选

天地图的key

googleMapsAPIKey string 可选

谷歌底图需要的key

proxy string 可选

代理地址,当域名不一致,请求会加上代理。避免跨域

tileFormat string 可选

地图瓦片出图格式,png/webp

mapSetting.mapClickCallback function 可选

地图被点击的回调函数

mapSetting.overlays function 可选

地图的overlayer

mapSetting.controls function 可选

地图的控件

mapSetting.interactions function 可选

地图控制的参数

Extends

Methods

refresh()

openlayers/mapping/WebMap.js, line 201

重新渲染地图

Version:
  • 10.1.0