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 地图