use Geocode service to show pin address in tooltip

4 posts, 0 answers
  1. Elek
    Elek avatar
    5 posts
    Member since:
    Apr 2010

    Posted 27 Apr 2010 Link to this post

    Hi,

    It seemed easy idea to add address returned from Reverse Geocode in my pin's tooltip. But the implementation of this issue is hard to me :( Can you help me please?
    Besides my pin is custom - like the one you have in your Item Virtualization Demo (not those one created with PinPoint class) > http://demos.telerik.com/silverlight/#Map/DynamicLayer
    And something else i noticed... when I tried your demo with Search service with the following - "Hospitals in Paris"  the result was ... awkward. The service putted pushpins on locations which doesn't have hospitals there for sure but instead missed obvious ones as -> Hopital Necker for example. You know some of the locations are labeled by default like the hospital I mentioned. That's why I know the service missed it.

    Thanks for your time :) Looking forward to hearing your answer as soon as possible.
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 29 Apr 2010 Link to this post

    Hi Evgenia,

    I have attached a sample solution that uses reverse geocoding for displaying the tooltip with address. It shows a pin by mouse click.
    Concerning the search or geocode service results -- unfortunately we do not have any influence on the results returned by the Bing services. Our control will return what the service provides in response.

    Regards,
    Andrey Murzov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
  4. Greg Sipes
    Greg Sipes avatar
    24 posts
    Member since:
    Apr 2010

    Posted 22 Sep 2010 Link to this post

    Andrey,
         I know that you do not influence Bing's geocode results at all, but is there any way we can catch or trap when the geocodes are not properly found? In other words, I send an exact address to Bing to be geocoded; if the address cannot be resolved correclty, it seems to be placing the geocoded address on the map in the middle of the zip code. Our users might have a few of these a day, which then plots all the points exactly on top of each other, so we need to trap when the address cannot be exactly resolved, so that we can slightly move it away from the last point.

    Thanks in advance,
    Greg
  5. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 24 Sep 2010 Link to this post

    Hello Greg Sipes,

    Each Result object of Response that returns with GeocodeCompleted event has EntityType property of type string. It returns "Address" when geocoding has found an exact address. On the other cases it returns type like to "Postcode1" or "RoadBlock".
    You can check this property to discover that the address has not been resolved correctly. The sample code is below.
    private void geoProvider_GeocodeCompleted(object sender, GeocodeCompletedEventArgs e)
    {
        if (e.Response.Results != null
            && e.Response.Results.Count > 0)
        {
            if (e.Response.Results[0].EntityType == "Address")
            {
                // address has been found
            }
            else
            {
                // address cannot be resolved correclty
            }
        }
    }

    All the best,
    Andrey Murzov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top