ArcGis for Javascrept_esri_map class:
1. Construction method: Esri. Map ();
Parameters:
Extent |
If this option is set, once the projection of this option is set, all the layers are drawn in the defined projection. |
Logo |
Whether to display ESRI's logo. |
wrapAround180 |
Whether to move the map continuously (that is, by date Line, similar to horizontal rotation of the map 360 degrees). |
LODs |
Sets the initial scale level of the map. |
Maxscale |
Set the maximum visual scale for a map |
Sliderstyle |
Sets the style of the slider (the value is large or small |
Cases:
1 startextent = new Esri.geometry.Extent (119.9299, 30.1652, 120.3687, 30.4028,//These four parameters are the maximum and minimum latitude and longitude of 2 new ESRI. Spatialreference ({wkid:4490}),//This parameter defines the coordinate system of map 3); 4 Esri.config.defaults.map.sliderLabel = null;5 Map = New ESRI. Map (' MyMap ', {6 logo:false,7 slider:false,8 extent:startextent,9});
2. Properties:
1AutoResizeIf the browser window or
2ContentPaneThe size of the widget for the filled map control is resized, and the map is automatically resized.
3AttributionMap Properties
4FadeonzoomWhether the fade-out effect is enabled when the map is scaled
5extentThe extent of the map outsourcing rectangle, which is the four corner coordinate range.
6force3dtransformsWhether to enable CSS3 conversion
7InfowindowDisplay a message box on a map
8IsclickrecenterHold down the SHIFT key and click the left mouse button on the map to set the point as the center of the map
9IsdoubleclickzoomDouble click the left mouse button, whether to enlarge the map operation
10IsPanSet whether the map can be moved with the mouse
11spatialreferenceGet spatial reference information for a map
12iskeyboardnavigationDo you want to use the + and-nav maps on your keyboard?
13IsrubberbandzoomWhether to enable Rubber band Zoom mode
14IsscrollwheelzoomWhether to allow the wheel to scale operation
15IsshiftdoubleclickzoomHold down the SHIFT key and double-click the left mouse button on the map to set the point as the center of the map while zooming
16geographicextentGeographic coordinate range of the map (Web Mercator only)
17LayeridsList of layer IDs that the map has loaded
18LoadedWhether the map control is loaded complete
19GraphicsGet the Graphicslayer of the map
20positionMap top left corner coordinates
21stRootDOM nodes that hold containers for layers, message boxes, and so on
22showattributionWhether to allow map properties to be displayed
23SnappingmanagerCapture Manager
24IszoomsliderSets or gets the magnified slider state of the map (true and False)
25LayeridsID of the layer that gets the map (array)
26NavigationModeSet or get the navigation mode of the map
27timeextentTime range of the map
3. Method:
Toscreen/tomap Map does not convert the coordinates between screens
Setscale Set the map to a specified scale bar
setzoom Indent to a specified level
SetLevel Indent to a specified level
setextend Set the map display range, commonly used for panning operations on the map
Disablepan Do not pan the map with the mouse
removealllayers Remove all Layers
AddLayer Add a layer
Getbasemap Get Basemap
Getlayer Get layers by ID
Getlevel Get the magnification level of the current map
centerandzoom Set the center and magnification level of the map
setmapcursor Set the mouse on the map to be hand-shaped, with the parameters: pointer
14GetlayersvisibleatscalerangeGet a visible layer (an array of layers) under a scale
15GetscaleGet the current scale bar
16hidepanarrowsHide the mouse arrows when moving
17HidezoomsliderHide the Zoom slider
18PanrightPan Right
19PanupPan North
20removealllayersRemove all Layers
21stRemovelayerRemove a specified layer
22ReorderlayerChange the order of layers
23RepositionReset the map, this method is used when the map div is reset
24settimeextentSet the time range for a map
25SettimesliderSet the time slider associated with the map
26SetzoomSet magnification level
27showpanarrowsShow translation Arrows
28ShowzoomsliderShow Zoom Slider
29EnablepanAllow the mouse to drag the map
30AddlayelsAdd a layer
4. Event:
Onextentchange Map extent Change Event
Onbasemapchange The map's basemap has changed
onLoad Occurs when the first layer or basemap is added to the map
OnClick Occurs when a click occurs on the map
Onlayeradd Occurs when a layer is added
Onlayersaddresult Occurs after all layers have been added, after using the Map.addlayers method
onlayersremoved Occurs when all layers have been removed
onLoad Occurs when the first layer or BASEMAP is loaded successfully
OnMouseDown Occurs when the mouse clicks on the map
OnMouseMove Occurs when the mouse moves on the map (often used to get x, y coordinates in this event).
onmouseout Occurs when the mouse moves out of the map
"Summarize" The map class of the ArcGIS JS API