0

Im doing exactly the same as in this question:

How can I call MapLocationFinder.FindLocationsAsync() to get the coordinates for an address without already knowing the latitude and longitude?

However my result.locations list keeps running into an error while result.status is success

    Private Async Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim addressToGeocode As String = "Microsoft"

        Dim queryHint As New BasicGeoposition With {.Latitude = 47.643, .Longitude = -122.131}
        Dim hintPoint As New Geopoint(queryHint)

        Dim result As MapLocationFinderResult = Await MapLocationFinder.FindLocationsAsync(addressToGeocode, hintPoint, 3)
        If result.Status = MapLocationFinderStatus.Success Then
            Dim test = result.Locations(0) 'xxx
        End If
    End Sub

"No type information for MapGeocoder.dll"

Have you any helpful references for this?

  • 1
    If you follow the link on that original question there are actually sample projects you can review. Guessing you're missing the Windows.Services.Maps libaray https://learn.microsoft.com/en-us/uwp/api/Windows.Services.Maps?view=winrt-22621 – Hursey Jan 19 '23 at 19:40

0 Answers0