问题描述:

How to get string address by coordinates? I am using gmaps.js 3rd party API. Is there someone how was working with it? I want to get string addresses, and I know coordinates.

UPD. Actually I know about google maps standart tutorials, the question is how to pick up the data using gmaps.js. I know for sure that this data can be taken.

网友答案:

I think you can get the help at https://developers.google.com/maps/documentation/geocoding/ OR https://developers.google.com/places/documentation/ These links are google tutorials for google geocoding API.

网友答案:

I do not know if it's supported by gmaps.js, but basically you are searching for "reverse geocoding"

EDIT: Unfortunately there is no "direct" support in gmaps.js for (reverse) geocoding, but you can still use google geocoding in gmap.js (in a mixed way):


var opt = {
    lat : 40.714224,
    lng : -73.961452,
    callback : function(results, status) {
        if (status == google.maps.GeocoderStatus.OK) {
            console.log(results[1].formatted_address);
        }
    }
}

GMaps.geocode(opt);

相关阅读:
Top