ArcGIS for javascript: GraphicsLayer and arcgisjavascript
1) first obtain the plane coordinate, and instantiate the coordinate object based on the corresponding coordinate system, as shown below:
Var point = new esri. geometry. Point (xpoint, ypoint, new esri. SpatialReference ({wkid: 4326 }));
The value after wkid must select the Coordinate System Standard corresponding to the current GIS, not necessarily 4326!
2) instantiate the content Template
Var infoTemplate = new esri. InfoTemplate (content, "<a href = 'javascript: showDetail () '> View Details </a> ");
3) instantiate graphical symbols
Var symbol = new esri. symbol. PictureMarkerSymbol ("images/red.png", 25, 25 );
4) instantiate Basic Elements
Var graphic = new esri. Graphic (point, symbol, null, infoTemplate );
5) instantiate GraphicsLayer
GraphicLayer = new esri. layers. GraphicsLayer ();
6) add elements to the Image Layer
GraphicLayer. add (graphic );
7) center the current Coordinate
Map. centerAt (point );
Note: Sometimes the center effect is invalid because the third coordinate system parameter of Point is incorrect. Therefore, you must first understand the coordinate system of the GIS layer!
How to configure arcgis for javascript
Have you checked this online?
Is arcgis api for javascript the same as arcgis Javascript api?
One thing, after 10.0, it was changed. for example, it was originally arcgis flex viewer and now arcgis viewer for flex...