arcgis javascript api 学习2

 

added by zhangjun at 2011-2-16

Class: Map  

Description  dojo.require("esri.map");

The esri.Map class creates a container and required DOM structure for adding layers, graphics, an info window, and other navigation controls(map为添加layers,graphics,infowindow以及导航控件等创建一个容器和必须的DOM结构 map的4样东西layers,graphic,inforwindow,toolbars). Typically, a map is added to a page using a DIV(map使用DIV的方式添加到网页中). The map's width and height are initialized to those of the DIV container. The Map.onLoad event is fired after the first layer has been added to the map(Map.onLoad事件在第一个图层被添加到map后触发). At this point, the map is fully functional. A Map.onLoad handler function should be used to add content and change map behaviors(map.onLoad事件处理函数应该用来添加内容和改变地图行为).
——————————————————————————————————————————————————————————————————
Class: ArcGISDynamicMapServiceLayer  

Description dojo.require("esri.layers.agsdynamic");

Allows you to work with a dynamic map service resource exposed by the ArcGIS Server REST API(允许你使用动态的基于ArcGIS Server REST API发布的地图服务). A dynamic map service generates images on the fly(一个动态的底图服务产生即时(临时生成的)的图片). For cached map services, see ArcGISTiledMapServiceLayer.
If the first layer added to the map is an ArcGISDynamicMapServiceLayer, the map will take on the projection of this layer(如果第一个添加到map中的图层是ArcGISDynamicMapServiceLayer,map将使用这个图层的投影).

——————————————————————————————————————————————————————————————————

Class: GraphicsLayer

Description dojo.require("esri.layers.graphics");

A layer that contains one or more Graphic features(GraphicLayer 可以包含一个或者多个Graphic feature). Each map contains a GraphicsLayer by default, accessible using the Map.Graphics property(每个map默认包含一个GraphicLayer,通过Map.Graphics属性可以访问默认的GraphicLayer). Beginning with v1.4, you can create your own graphics layers and add them to the map. Graphics layers can be reordered within the group of graphics layers. However, the graphics layer in Map.Graphics is always on top(默认的GraphicLayer始终在顶部). Also, all graphics layers are always on top of TiledMapServiceLayers and DynamicMapServiceLayers。

——————————————————————————————————————————————————————————————————

Class: Draw 

Description dojo.require("esri.toolbars.draw");

Toolbar that supports functionality to create new geometries by drawing them: points (POINT or MULTI_POINT), lines (LINE, POLYLINE, or FREEHAND_POLYLINE), polygons (FREEHAND_POLYGON or POLYGON), or rectangles (EXTENT)(Draw是工具类,它支持通过画点线面生成新的几何形状的功能). To edit geometries of existing graphics, use the Edit Toolbar. (编辑已经存在的graphics的几何形状,请使用Edit Toolbar)

Mouse behavior when drawing features

  • For POINT, click to add a point.
  • For MULTI_POINT, click to add points, double-click to add the last point of the multi-point.
  • For POLYLINE and POLYGON, click to add vertices, double-click to add the last vertex.
  • For FREEHAND_POLYLINE and FREEHAND_POLYGON, press mouse down where to start, draw the feature, then let go when finished drawing.
  • For LINE, EXTENT, press mouse down where to start and let go where to end the feature

————————————————————————————————————————————————————————————————————

Class: Edit 

Description Class added v2.0. dojo.require("esri.toolbars.edit");

The Edit toolbar is a helper class that provides functionality to move graphics or modify individual vertices(Edit 是工具类,它支持移动graphics或者修改dingdian的功能), i.e. edit the geometry of existing graphics. To add new graphics, use the Draw toolbar. Updated at version 2.1 to include support for rotating and scaling(直到2.1版本,Edit工具类支持旋转和比例放大缩小功能).

Mouse behavior when editing features:

  • To move a feature, once the Edit toolbar is activated with that feature, press down on the feature, drag it, then let go at the new location.
  • To add a vertex to a polyline or polygon, click on a "ghost" vertices and move it to the new location.
  • To delete a vertex from a polyline or polygon, right-click the vertex and select 'Delete Vertex' from the menu. Only valid for polylines with at least three vertices and polygons with at least four vertices.
  • To rotate or scale a geometry click the handle and move to the desired location.

——————————————————————————————————————————————————————————————————————

Class: Graphic 

Description dojo.require("esri.graphic");

A Graphic can contain geometry, a symbol, attributes, or an infoTemplate(Graphic能够包含几何形状,符号,属性或者infoTemplate /属性和infotemplate是或的关系). A Graphic is displayed in the GraphicsLayer.(Graphic 被展示在GraphicLayer上) The GraphicsLayer allows you to listen for events on Graphics(GraphicLayer允许你监听发生在Graphic上的事件 // added by zhangjun at 2011-02-21 GraphicLayer可以监听许多的事件,比如onclikc,onmousuemove etc,允许你监听发生在Graphic上的事件,比如鼠标click一个graphic或者move一个graphic).
___________________________________________________________________
map和graphiclayer上的事件最多,infowindow是map的属性,infotemplate是graphcilayer的属性(给graphic绑定infotemplate,点击或移动过graphic就可以弹出对应的map的infowindow)
原文地址:https://www.cnblogs.com/zhangjun1130/p/1955746.html