Get address on user click

Hi,

I've just started using Virtual Earth...

It's possible to get the address from the clicked point

Thanks!



Answer this question

Get address on user click

  • Sarika Wake

    Nice implementation.
    Care to share how you went about it for others
    I notice its only for the US.
    John.


  • zerovelocity

    Hi,

    You can't get an address but you can get the latitude and longitude by attaching an event to the map.

    map.AttachEvent( "onclick", OnMapClick );
    }
    function OnMapClick(e)
    {
    alert( "Latitude = " + e.view.LatLong.Latitude + ", Longitude = " + e.view.LatLong.Longitude + ", Zoom = " + e.view.zoomLevel );
    }

    Not sure how this would help you find an address though.

    Gerry


  • Davids Learning

    Thanks to both of you...


  • Zebedeu

    To get the address from a lat lon you need to look into reverse geocoding.
    Virtual Earth does not do this.
    There are some free services available for non-commercial use (yahoo) or try Map point for commerical per transaction.
    For commerical use these are quite expensive. You may want to look at doing it yourself using the free tiger data for the US. There a few projects around.
    John.




  • Agent00

    I suspect this may be using the MapPoint Web Service

  • suddenelfilio

  • thames

    Atlas - powered by Fresh Logic Studios (http://atlas.freshlogicstudios.com) supports this from the right click menu.

    Simply right click a location on the map, then click the "about this location" link.

  • Get address on user click