博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
arcgis JavaScript 加载 mapbox地图
阅读量:5226 次
发布时间:2019-06-14

本文共 1385 字,大约阅读时间需要 4 分钟。

mapbox 地图现在是越来越好看了, 随便试

/** * Created by Administrator on 2018/5/15 0015. */import * as esriLoader from 'esri-loader'import {mapBoxType} from "./MapBoxType"export const mapBoxLayer = {};mapBoxLayer.layerType = mapBoxType;mapBoxLayer.addLayer = function (type,map) {  esriLoader.dojoRequire([      "esri/map",      "esri/layers/WebTiledLayer"],    function (Map,              WebTiledLayer) {      let url =  "https://${subDomain}.tiles.mapbox.com/v4/mapbox."+ type +"/${level}/${col}/${row}.png?access_token=pk.eyJ1IjoiYW5hbHl0aWNhbGdyYXBoaWNzIiwiYSI6ImNpd204Zm4wejAwNzYyeW5uNjYyZmFwdWEifQ.7i-VIZZWX8pd1bTfxIVj9g"      let  webTileLayer = new WebTiledLayer(url, {        "subDomains": ["a", "b", "c"]      });      map.addLayer(webTileLayer);    })}
/** * Created by Administrator on 2018/5/15 0015. */export const mapBoxType = {}mapBoxType.streets = "streets";mapBoxType.light = "light";mapBoxType.dark = "dark";mapBoxType.satellite = "satellite";mapBoxType.streetsSatellite = "streets-satellite";mapBoxType.wheatpaste = "wheatpaste";mapBoxType.streetsBasic = "streets-basic";mapBoxType.comic = "comic";mapBoxType.outdoors = "outdoors";mapBoxType.runBikeHike = "run-bike-hike";mapBoxType.pencil = "pencil";mapBoxType.pirates = "pirates";mapBoxType.emerald = "emerald";mapBoxType.highContrast = "high-contrast";

  

试arcgis加载mapbox 地图

转载于:https://www.cnblogs.com/haibalai/p/9049590.html

你可能感兴趣的文章
定制jackson的自定义序列化(null值的处理)
查看>>
auth模块
查看>>
javascript keycode大全
查看>>
前台freemark获取后台的值
查看>>
log4j.properties的作用
查看>>
游戏偶感
查看>>
Leetcode: Unique Binary Search Trees II
查看>>
C++ FFLIB 之FFDB: 使用 Mysql&Sqlite 实现CRUD
查看>>
Spring-hibernate整合
查看>>
c++ map
查看>>
exit和return的区别
查看>>
js += 含义(小知识)
查看>>
B2321 [BeiJing2011集训]星器 数学&&物理
查看>>
201571030319 四则运算
查看>>
RestTemplate 调用本地服务 connection refused
查看>>
.NET方向高级开发人员面试时应该事先考虑的问题
查看>>
台达PLC modbus 不支持04功能码
查看>>
发布一个JavaScript工具类库jutil,欢迎使用,欢迎补充,欢迎挑错!
查看>>
discuz 常用脚本格式化数据
查看>>
洛谷P2777
查看>>