Is it possible to retrieve ZIP Code (Postal Code) from address in RadMap for Win Forms?

1 Answer 145 Views
Map
Alessandro
Top achievements
Rank 1
Iron
Alessandro asked on 28 Sep 2021, 11:03 PM

Hi,

I was wondering if with the Bing Search feature in radmap is possible to get a Postal Code inputting an address (eg: City, Nation and street)...

Any idea?

Thank you

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 01 Oct 2021, 12:17 PM

Hi Alessandro,

We are using the following API to make the search requests. The response contains information of the address and the postal code. You can handle the Bing provider's SearchCompleted event and test this way: 

private void BingProvider_SearchCompleted(object sender, SearchCompletedEventArgs e)
{
    foreach (var location in e.Locations)
    {
        if (location.Address != null)
        {
            var postalCode = location.Address.PostalCode;
        }
    }
}

 Please note that the Bing API may not always return the postal code. The more precise the query is so is the result.

Regards,
Hristo
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Alessandro
Top achievements
Rank 1
Iron
commented on 01 Oct 2021, 02:48 PM

ok, thank you for the solution!
Tags
Map
Asked by
Alessandro
Top achievements
Rank 1
Iron
Answers by
Hristo
Telerik team
Share this question
or