mowatermelon / vue-esri

基于vue,vuex的esri地图后台操作模板
3 stars 4 forks source link

学习Arcgis for Gis 4.6 #2

Open mowatermelon opened 6 years ago

mowatermelon commented 6 years ago

Specifies a basemap for the map. The basemap is a set of tile layers that give geographic context to the MapView or SceneView and the other operational layers in the map.

This value can be an instance of Basemap or one of the strings listed in the table below.

ValueDescription
streetsbasemap-streets
satellitebasemap-satellite
hybridbasemap-hybrid
topobasemap-topo
graybasemap-gray
dark-graybasemap-dark-gray
oceansbasemap-oceans
national-geographicbasemap-national-geographic
terrainbasemap-terrain
osmbasemap-osm
dark-gray-vectordark-gray-vector
gray-vectorgray-vector
streets-vectorstreets-vector
topo-vectortopo-vector
streets-night-vectorstreets-night-vector
streets-relief-vectorstreets-relief-vector
streets-navigation-vectorstreets-navigation-vector
mowatermelon commented 6 years ago
NameTypeSummaryClass
Collection<Layer>

A flat collection of all the layers in the map.

more details
more detailsMap
Basemap

Specifies a basemap for the map.

more details
more detailsMap
String

The name of the class.

more details
more detailsAccessor
Ground

Specifies the surface properties for the map.

more details
more detailsMap
Collection<Layer>

A collection of operational layers.

more details
more detailsMap
mowatermelon commented 6 years ago

spatialReference

NameTypeSummaryClass
String

The name of the class.

more details
more detailsAccessor
Boolean

Indicates if the spatial reference refers to a geographic coordinate system.

more details
more detailsSpatialReference
Boolean

Indicates if the wkid of the spatial reference object is one of the following values: 102113, 102100, 3857.

more details
more detailsSpatialReference
Boolean

Indicates if the wkid of the spatial reference object is 4326.

more details
more detailsSpatialReference
Boolean

Indicates if the spatial reference of the map supports wrapping around the International Date Line.

more details
more detailsSpatialReference
SpatialReference

A convenience spatial reference instance for Web Mercator.

more details
more detailsSpatialReference
SpatialReference

A convenience spatial reference instance for WGS84.

more details
more detailsSpatialReference
Number

The well-known ID of a spatial reference.

more details
more detailsSpatialReference
String

The well-known text that defines a spatial reference.

more details
more detailsSpatialReference
mowatermelon commented 6 years ago

同样的dom

<div id="viewDiv" class="map_div" @mousemove="showCoordinates($event)" ></div>

3.16获取鼠标mapobject写法

      // 显示当前坐标
      showCoordinates: function(e) {
        let _this = this;
        if(!_this.isHide){
            _this.evt.x = e.mapPoint.x;
            _this.evt.y = e.mapPoint.y;
        }
      }

4.6写法

      // 显示当前坐标
      showCoordinates: function(e) {
        let _this = this;
        _this.view.hitTest(e)
          .then(function(res){
            let point = res.results[0].mapPoint;
            if(!_this.isHide){
                _this.evt.x = point.x;
                _this.evt.y = point.y;
            }
        });
      }