Can someone help me how to plot latitude and longitudes on esri maps in angular please?
Asked
Active
Viewed 3,201 times
-1
-
How are you getting the coordinates?, what is the source? – cabesuon Aug 20 '20 at 12:57
-
am getting the coordinates from MongoDB,@cabesuon – paul samuel Aug 24 '20 at 12:01
1 Answers
1
First thing first, you need to include the ArcGIS library in your angular project. For that you have two options:
- using
@arcgis/webpack-plugin
, or - using
esri-loader
This that I mentions plus both options are well documented in the ArcGIS documents ArcGIS Docs - Using the ArcGIS API for JavaScript with Angular.
Once you get your project running, you are ready to take the next step.
I am still not quite sure how are you retrieving the data. So the general answer in the API context would be:
- If your data is in GeoJSON format, you can use
GeoJSONLayer
(ArcGIS Docs - GeoJSONLayer) - If your data is in CSV format, you can use
CSVLayer
(ArcGIS Docs - CSVLayer) - If your data is in KML format you can use
KMLLayer
(ArcGIS Docs - KLLayer) - Finally, the general answer would be to use
FeatureLayer
andsource
attribute. The process in this case is to retrieve the data create the features (probably usingesri/Graphic
,esri/geometry/Point
andesri/geometry/SpatialReference
), and then add it to the layer usingapplyEdits
method.
One great thing of ArcGIS API (and ESRI's product in general) is that it has great documentation.

cabesuon
- 4,860
- 2
- 15
- 24
-
Thanks a lot...i will follow the steps which you mentioned as well as documentation... – paul samuel Aug 25 '20 at 09:07
-