Google Maps API - Get Coordinates of address

前端 未结 4 1652
离开以前
离开以前 2020-11-30 16:27

I would like to convert addresses into long/lat.

Is there any way to do this without using JavaScript? Because in my case there is no need to display anythi

4条回答
  •  猫巷女王i
    2020-11-30 16:50

    Althugh you asked for Google Maps API, I suggest an open source, working, legal, free and crowdsourced API by Open street maps

    https://nominatim.openstreetmap.org/search?q=Mumbai&format=json

    Here is the API documentation for reference.

    Edit: It looks like there are discrepancies occasionally, at least in terms of postal codes, when compared to the Google Maps API, and the latter seems to be more accurate. This was the case when validating addresses in Canada with the Canada Post search service, however, it might be true for other countries too.

提交回复
热议问题