Google地图API地理编码为两个不同的地方返回相同的坐标 [英] Google maps API geocoding returns same coordinates for two different places

查看:124
本文介绍了Google地图API地理编码为两个不同的地方返回相同的坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图获得这些POI的坐标,但是Google地理编码返回了错误的坐标,这两个地址都是相同的坐标。在谷歌地图他们工作得很好。我应该如何为他们构建正确的网址?

I'm trying to get the coords for these POI but Google Geocoding returns wrong coords, the same coords for both addresses. In the Google Maps they work fine. How should I construct a correct URL for them?

https://maps.googleapis.com/maps/api/geocode/json?address=Paleo+Enetiko+Frourio,+Corfu+491+00+Greece

https://maps.googleapis.com/maps/api/geocode/json?address=Vlacherna+monastery,+Corfu+491+00+Greece


推荐答案

地方不是邮政地址。就地理编码器而言,他们都解决相同的地址(希腊科孚岛)。如果您需要包含地名(您没有完整的邮寄地址),请使用地点API

Those are "places" not postal addresses. They both resolve to the same "address" as far as the geocoder is concerned ("Corfu, Greece"). If you need to include the "place name" (you don't have a complete postal address), use the Places API

一些主要的兴趣点包含在地理编码数据库中(如艾菲尔铁塔,自由女神像,科隆大教堂)但不是全部。

Some major points of interest are included in the geocoding database (like "Eiffel Tower", "Statue of Liberty", "Cologne Cathedral") but not all.

这篇关于Google地图API地理编码为两个不同的地方返回相同的坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆