《构建Web和ArcGIS Server应用实战》[0].创建地图

书的版本有点老,具体的代码需要参照官方的文档

但是,书可以讲讲怎么回事~ 

官网,一言不合就英文

不过,也有中文版哈

嗯嗯~~~ 有中文 !!!

 

第一章 可以略过

从 第二章 开始 

第二章 创建地图 添加图层

本文只是 创建地图

 

官方的 

baseMap的说明文档~

https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html#basemap

官网的沙盘

https://codepen.io/pen?&editable=true&editors=100

 其他网友的

https://blog.csdn.net/huyanliang/article/details/73844673

 

<html>
  <head>
    <meta charset="utf-8" />
    <meta
      name="viewport"
      content="initial-scale=1,maximum-scale=1,user-scalable=no"
    />
    <!--
  ArcGIS API for JavaScript, https://js.arcgis.com
  For more information about the intro-mapview sample, read the original sample description at developers.arcgis.com.
  https://developers.arcgis.com/javascript/latest/sample-code/intro-mapview/index.html
  -->
<title>Intro to MapView - Create a 2D map - 4.15</title>
    <style>
      html,
      body,
      #viewDiv {
        padding: 0;
        margin: 0;
        height: 100%;
        width: 100%;
      }
    </style>

    <link
      rel="stylesheet"
      href="https://js.arcgis.com/4.15/esri/themes/light/main.css"
    />
    <script src="https://js.arcgis.com/4.15/"></script>

    <script>
      require(["esri/Map", "esri/views/MapView"], function(Map, MapView) {
        var map = new Map({
          basemap: "topo"
        });

        var view = new MapView({
          container: "viewDiv",
          map: map,
          zoom: 12,
          center: [117.20, 39.12] // longitude, latitude
        });
      });
    </script>
  </head>

  <body>
    <div id="viewDiv"></div>
  </body>
</html>

topo

 

streets

 什么鬼~~

satellite 

 
hybrid


dark-gray


gray


national-geographic


oceans


osm 

要不说 得找呢 这才是想要的吧 中文的 全的 不是自己翻译 自己画的 ~~~ 
terrain


dark-gray-vector


gray-vector


streets-vector


streets-night-vector


streets-navigation-vector


topo-vector


streets-relief-vector 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章