ArcGIS API for JavaScript 4.0(一)

最近ArcGIS推出了ArcGIS API for JavaScript 4.0,支持无插件3D显示,而且比较Unity和Skyline,速度要快很多,适合在智慧城市中小场景的三维模型应用。下面开始吧!

 

一、引入样式和js

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

二、导入三个js包

"esri/Map", "esri/views/SceneView"
 require([
      "esri/Map",
      "esri/views/SceneView",
      "dojo/domReady!"
    ], function (Map, SceneView) {

    });

三、创建地图对象

 var map = new Map({
            basemap: "streets",
            ground: "world-elevation"
        });

四、创建Scene视图

 var view = new SceneView({
            container: "viewDiv",  //Div的ID
            map: map ,
            scale: 50000000,         
            center: [-101.17, 21.78]  
        });

DOM对象

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

 

posted on 2016-06-24 14:46  不吃甘草片  阅读(1398)  评论(0编辑  收藏  举报

导航