I search for objects on the map using the local locator. The search works and finds objects. But I can not understand how to extract the geographical coordinates of the found volume from the search results.
Hi Yuri,
You could set the OutputSpatialReference of the GeocodeParameters to "SpatialReferences.Wgs84" to get the geographical coordinates
GeocodeParameters gcParams = new GeocodeParameters(); gcParams.OutputSpatialReference = SpatialReferences.Wgs84;
IReadOnlyList<GeocodeResult> results = await localLocatorTask.GeocodeAsync("address", gcParams);
Debug.WriteLine("Latitude: " + results[0].InputLocation.Y + " Longitude: " + results[0].InputLocation.X);
Hope that helps. Thanks
Nagma
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.