Select to view content in your preferred language

How to add a new layer and add points to it?

615
3
Jump to solution
01-06-2023 07:57 AM
JinZ
by
New Contributor II

Hi,

I've got a list of points(latitude,longitude). How to add these points to the map using the Arcgis Pro SDK?

 

Thanks!

0 Kudos
1 Solution

Accepted Solutions
DougGreen
Occasional Contributor II
  1. Design an interface that allows the user to specify a file or paste text that contains the list of points.
  2. Create a new feature class
  3. Edit the feature class, looping through each point and adding them. 

I'd spend some time in the documentation as well as check out this existing post that explains a similar request. 

View solution in original post

0 Kudos
3 Replies
DougGreen
Occasional Contributor II
  1. Design an interface that allows the user to specify a file or paste text that contains the list of points.
  2. Create a new feature class
  3. Edit the feature class, looping through each point and adding them. 

I'd spend some time in the documentation as well as check out this existing post that explains a similar request. 

0 Kudos
JinZ
by
New Contributor II

Thanks,

I have Lat/long of the points, how can I convert them to X/Y? 

MapPointBuilder and Coordinate2D seem only work with X/Ys.

0 Kudos
DougGreen
Occasional Contributor II

I suspect it's due to an incorrect Spatial Reference or the lat/lon being swapped? (Lat = Y, Lon=X). If you are using WGS84 lat lon, the WKID is 4326. This snippet section leads through setting up a spatial reference and constructing a geometry. 

0 Kudos