最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

mapbox-gl加載超圖iserver發(fā)布切片

2022-11-29 17:17 作者:地理信息技術(shù)雜談  | 我要投稿

如何在mapbox-gl加載超圖iserver發(fā)布的切片數(shù)據(jù)。

超圖isever發(fā)布數(shù)據(jù)的形式,跟arcgis server發(fā)布的有些不同,在加載時,也有一定的區(qū)別,超圖在線可測試地圖數(shù)據(jù)網(wǎng)址如下:http://support.supermap.com:8090/iserver/services/map-world/rest/maps/World

支持操作如下截圖:??


mapbox-gl加載iserver發(fā)布的切片數(shù)據(jù),可以采取以下幾種方式:

  • tileFeature 矢量切片形式

  • tileImage? ?經(jīng)緯度切片形式

  • zxyTileImage?墨卡托切片形式??

  • 1、tileFeature?加載

    http://support.supermap.com.cn:8090/iserver/iClient/forJavaScript/examples/mapboxgl/editor.html#mvtVectorTile

    數(shù)據(jù)源:

    "sources": {

    ? ? ? ? ? ? ? ? "vector-tiles": {

    ? ? ? ? ? ? ? ? ? ? "attribution": attribution,

    ? ? ? ? ? ? ? ? ? ?"type": "vector",

? ? ? ? ? ? ? ? ? ?"tiles": [host + "/iserver/services/map-china400/rest/maps/China/tileFeature.mvt?_cache=false&returnAttributes=true&width=512&height=512&viewBounds={bbox-epsg-3857}"]

? ? ? ? ? ? ? ? },

? ? ? ? ? ? },

? ? ? ? ?加載其中的圖層:

? ? ? ?map.addLayer({

? ? ? ? ? ? "id": "China_Boundary",

? ? ? ? ? ? "type": "line",

? ? ? ? ? ? "source": "vector-tiles",

? ? ? ? ? ? "source-layer": "China_Boundary_A_ln@China",

? ? ? ? ? ? "paint": {

? ? ? ? ? ? ? ? "line-color": "hsl(230, 8%, 51%)",

? ? ? ? ? ? ? ? "line-width": {

? ? ? ? ? ? ? ? ? ? "base": 1,

? ? ? ? ? ? ? ? ? ? "stops": [

? ? ? ? ? ? ? ? ? ? ? ? [

? ? ? ? ? ? ? ? ? ? ? ? ? ? 3,

? ? ? ? ? ? ? ? ? ? ? ? ? ? 0.5

? ? ? ? ? ? ? ? ? ? ? ? ],

? ? ? ? ? ? ? ? ? ? ? ? [

? ? ? ? ? ? ? ? ? ? ? ? ? ? 10,

? ? ? ? ? ? ? ? ? ? ? ? ? ? 2

? ? ? ? ? ? ? ? ? ? ? ? ]

? ? ? ? ? ? ? ? ? ? ]

? ? ? ? ? ? ? ? }

? ? ? ? ? ? }

? ? ? ? });

2、tileImage? ?加載http://support.supermap.com.cn:8090/iserver/iClient/forJavaScript/examples/mapboxgl/editor.html#01_tiledMapLayer_4326數(shù)據(jù)源:

tiles: [host + '/iserver/services/map-world/rest/maps/World'],

? ? ? ? ? ? ? ? ? ? ? ? ? ? rasterSource: 'iserver'

圖層:

? ? ? ? {

? ? ? ? ? ? ? ? ? ? ? ? ? ? id: 'simple-tiles',

? ? ? ? ? ? ? ? ? ? ? ? ? ? type: 'raster',

? ? ? ? ? ? ? ? ? ? ? ? ? ? source: 'raster-tiles',

? ? ? ? ? ? ? ? ? ? ? ? ? ? minzoom: 0,

? ? ? ? ? ? ? ? ? ? ? ? ? ? maxzoom: 22

? ? ? ? ??}

注意:iserver的切片是以比例尺+X索引+Y索引進行請求的,所以,加載此類圖層,需要使用超圖基于mapbox-gl的擴展。

? ? ??tileImage的請求形式:

3、zxyTileImage?加載http://support.supermap.com.cn:8090/iserver/iClient/forJavaScript/examples/mapboxgl/editor.html#01_tiledMapLayer數(shù)據(jù)源:

sources": {

? ? ? ? ? ? ? ? "raster-tiles": {

? ? ? ? ? ? ? ? ? ? "attribution": attribution,

? ? ? ? ? ? ? ? ? ? "type": "raster",

? ? ? ? ? ? ? ? ? ? "tiles": [host + '/iserver/services/map-china400/rest/maps/China/zxyTileImage.png?z={z}&x={x}&y={y}'],

? ? ? ? ? ? ? ? ? ? "tileSize": 256

? ? ? ? ? ? ? ? }

? ? ? ? ? ? },

圖層:

? ? ? ? ? ? "layers": [{

? ? ? ? ? ? ? ? "id": "simple-tiles",

? ? ? ? ? ? ? ? "type": "raster",

? ? ? ? ? ? ? ? "source": "raster-tiles",

? ? ? ? ? ? ? ? "minzoom": 0,

? ? ? ? ? ? ? ? "maxzoom": 22

? ? ? ? ? ? }]


mapbox-gl加載超圖iserver發(fā)布切片的評論 (共 條)

分享到微博請遵守國家法律
招远市| 通海县| 无为县| 喀什市| 漳州市| 石台县| 锡林浩特市| 洪江市| 常宁市| 泸西县| 天全县| 桃源县| 东源县| 三亚市| 宕昌县| 富源县| 中山市| 朝阳县| 乌兰察布市| 调兵山市| 天水市| 望谟县| 高雄市| 二连浩特市| 织金县| 无锡市| 华坪县| 马关县| 赤壁市| 白朗县| 洱源县| 连江县| 莱阳市| 甘肃省| 宁乡县| 定州市| 巧家县| 佛教| 桐城市| 桦南县| 封开县|