国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(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ā)布切片的評論 (共 條)

分享到微博請遵守國家法律
登封市| 周宁县| 瑞昌市| 正镶白旗| 荥阳市| 虞城县| 平山县| 二连浩特市| 大港区| 徐水县| 和硕县| 读书| 乳源| 湟中县| 巴中市| 那坡县| 沅陵县| 洱源县| 和田县| 梅河口市| 鹤峰县| 大足县| 祁阳县| 波密县| 晋宁县| 济源市| 长白| 岚皋县| 瑞丽市| 武汉市| 城步| 浙江省| 西丰县| 宜君县| 石楼县| 班戈县| 晋州市| 丰镇市| 延安市| 吉隆县| 兴业县|