Home > front end >  Why don't ArcGIS for JS drawing show
Why don't ArcGIS for JS drawing show

Time:09-17

Feeling is the symbol definition out of the question, but can't find, is there a big help me have a look at

 
<script>
Var map;

Require ([
"Esri/map", "esri/geometry/Point", "esri/SpatialReference,"
"Esri/symbols/SimpleMarkerSymbol", "esri/graphic", "esri/symbols/SimpleLineSymbol", "esri/geometry/Polygon"
], function (Map, Point, SpatialReference SimpleMarkerSymbol, Graphic) {
The map=new map (" map ", {
Basemap: "topo,"
Center: [45] 0,,
Zoom:
});
The map on (" load ", the function () {drawPolygon; });
The function drawPolygon () {
Var points=[[0, 0], [do], [do] 45, 45, 0 [], [0, 0]].
Var polygon=new polygon (new SpatialReference (4326} {wkid:));
Polygon. AddRing (points);
Var simpleLineSymbol=new simpleLineSymbol (simpleLineSymbol. STYLE_SOLID, new Color (58,27,177 []), 23).
Var graphic=new graphic (polygon, SimpleLineSymbol);

The map. The graphics. The add (graphic);
};
});
</script>
  • Related