ArcGISLayer Class

ArcGISLayer(option)

mapboxgl地图文档加载类

Fx构造函数

# new ArcGISLayer(option)

参数:
名称 类型 属性 默认值 描述
option Object

属性键值对,地图属性字段。

layerType String <optional>
NGS_Topo_US_2D

必选(使用图层类型的方式调用接口时必选)。图层类型。Zondy.Enum.Map.ArcGISLayerType

url String <optional>
http://services.arcgisonline.com/ArcGIS/rest/services/{layerType}/MapServer/tile/{z}/{y}/{x}.jpg

必选(使用url的方式调用接口时必选)。服务地址。

tileSize String <optional>
256

可选(使用url的方式调用接口时生效)。瓦片大小。

dpi String <optional>
96

可选(使用url的方式调用接口时生效)。DPI值。

作者:
  • 基础平台/产品2部 龚跃健

查看源代码 mapboxgl/layer/ArcGISLayer.js, line 8

Examples
//地图容器
 //通过图层类型的方式访问。这种方式访问的服务地址是 http://services.arcgisonline.com/ArcGIS/rest/services/{layerType}/MapServer
 new mapboxgl.Zondy.Map.ArcGISLayer({
         layerType: Zondy.Enum.Map.ArcGISLayerType.StreetMapWorld2D
     }).addToMap(map);
//通过url的方式访问。这种方式访问的服务地址类似于 http://192.168.120.1:6080/arcgis/rest/services/SampleWorldCities/MapServer
 new mapboxgl.Zondy.Map.ArcGISLayer({
        url: 'http://192.168.120.1:6080/arcgis/rest/services/SampleWorldCities/MapServer'
    }).addToMap(map);