-1

Can someone help me how to plot latitude and longitudes on esri maps in angular please?

paul samuel
  • 23
  • 1
  • 2

1 Answers1

1

First thing first, you need to include the ArcGIS library in your angular project. For that you have two options:

  1. using @arcgis/webpack-plugin, or
  2. 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:

  1. If your data is in GeoJSON format, you can use GeoJSONLayer (ArcGIS Docs - GeoJSONLayer)
  2. If your data is in CSV format, you can use CSVLayer (ArcGIS Docs - CSVLayer)
  3. If your data is in KML format you can use KMLLayer (ArcGIS Docs - KLLayer)
  4. Finally, the general answer would be to use FeatureLayer and source attribute. The process in this case is to retrieve the data create the features (probably using esri/Graphic, esri/geometry/Point and esri/geometry/SpatialReference), and then add it to the layer using applyEdits 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