This is a migrated thread and some comments may be shown as answers.

How to get address?

2 Answers 198 Views
Map
This is a migrated thread and some comments may be shown as answers.
Andrey
Top achievements
Rank 1
Veteran
Andrey asked on 26 Oct 2020, 07:54 AM

Hi, Dev Team!

How get address by click at anything at map? (coordinates, country, city, street and house number).

Please, give some simple sample.

2 Answers, 1 is accepted

Sort by
0
Andrey
Top achievements
Rank 1
Veteran
answered on 27 Oct 2020, 10:53 AM

Okay, i was find how i can get coords. But what about country, city, street and house number?

 

var map = $("#map").data("kendoMap");

map.bind("click", function(e) {

console.log("You clicked at " + e.location.toString());

});

0
Accepted
Preslav
Telerik team
answered on 27 Oct 2020, 03:01 PM

Hello Andrey,

You are correct, using the click event handler can provide the coordinates.

As far as I know, transforming these coordinates to a location is not a feature that the Map providers usually provide.

Based on my research, this feature is called Reverse Geocoding, and I did not find any free APIs for it. I believe that the most popular one is provided by Google. You can check it here - https://developers.google.com/maps/documentation/javascript/geocoding#ReverseGeocoding

I hope the above information is useful.

 

Regards,
Preslav
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/.

Tags
Map
Asked by
Andrey
Top achievements
Rank 1
Veteran
Answers by
Andrey
Top achievements
Rank 1
Veteran
Preslav
Telerik team
Share this question
or