zoukankan      html  css  js  c++  java
  • arcgis JavaScript 加载 mapbox地图

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

  • 相关阅读:
    作业3
    数组求和
    2.自己的Github试用过程
    2.自己的Github注册流程
    图片左右滑动整理为插件
    artDialog中的time参数,ajax请求中的异步与同步
    简单的图片放大镜效果插件
    3月份学习安排
    前端好的网站
    web app开发中遇到的问题
  • 原文地址:https://www.cnblogs.com/haibalai/p/9049590.html
Copyright © 2011-2022 走看看