ArcGIS with ReactJS -1/5

Shyambeer Singh
2 min readDec 12, 2019

--

Creating a point over ArcGIS map using JS.

Initialize the Map:

One can initialize in the “require” statement, we need to add the “Map” and “MapView” modules.

ArcGIS map init

The above code is added post we’ve created a sample react app using ArcGIS JS starter app.

Adding a point on Map:

To add a point on the map first, we need to add the graphics layer on the base map.

Adding the graphics layer

Once the graphics layer has been added we can initialize the point and add this to the graphics layer.

Adding the point to the Graphics layer

Post this we can see a point on the map.

A point on the map

This explains the basic concept of adding a point over ArcGIS map using the Graphics layer.

Reference: https://developers.arcgis.com/labs/javascript/display-point-line-and-polygon-graphics/

CodePen: https://codepen.io/shyambeer-singh/pen/vYEKKGY?editors=1000

--

--