Select to view content in your preferred language

MapView wkid differs from mapView.locationDisplay.location wkid

417
2
Jump to solution
12-06-2023 06:43 AM
padmalcom
Occasional Contributor

Hi, we display a map with a spatial reference with wkid 3857. We use locationDisplay to track the user's position. Now we found out that this position comes in wkid 4326. Can you tell he where I can set the wkid for locationDisplay and why both differ?

0 Kudos
1 Solution

Accepted Solutions
GuntherHeppner
Esri Contributor

@padmalcom 

I assume you are using SystemLocationDataSource (the default) to track the user's location. SystemLocationDataSource uses Android's LocationManager, which provides locations in WGS 84. In order to get the corresponding location in the MapView's projection, you should use LocationDisplay.mapLocation.

View solution in original post

0 Kudos
2 Replies
GuntherHeppner
Esri Contributor

@padmalcom 

I assume you are using SystemLocationDataSource (the default) to track the user's location. SystemLocationDataSource uses Android's LocationManager, which provides locations in WGS 84. In order to get the corresponding location in the MapView's projection, you should use LocationDisplay.mapLocation.

0 Kudos
padmalcom
Occasional Contributor

Hi @GuntherHeppner, we use LocationDisplay.location and not mapLocation. This might result in the spatial reference difference.