Google地图嵌入在路线中显示的地址不正确 [英] Google Maps Embed displaying incorrect address on directions

查看:110
本文介绍了Google地图嵌入在路线中显示的地址不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚使用Google Maps Embed API向客户的网站添加了一个非常简单的代码段。这将显示所有正确的详细信息,但是当您单击路线链接时,会显示不同的地址。你可以在这里的网页上看到问题, http://www.picturesbyrob.co.uk / contact-us /

I have just added a very simple code snippet to a client's website using the Google Maps Embed API. This displays all of the correct details, but when you click on the "Directions" link, a different address is displayed. You can see the problem on the web page here, http://www.picturesbyrob.co.uk/contact-us/

之前有人看到过这样的问题吗?我不确定数据或应用程序是否存在根本问题。

Anyone seen a problem like this before? I'm not sure if there's an underlying issue with the data or with the application.

感激地收到了任何指针。感谢。

Any pointers gratefully received. Thanks.

推荐答案

这是因为您的方向请求中传递的坐标是 https://maps.google.com/maps?ll=54.033922,-0.589114 &安培; Z = 7& T公司= M&安培; HL =的en-US&安培; GL = US&安培; mapclient =嵌入&安培; DADDR =摄影师%20英寸%20York%20118%20Middlecroft%20Drive%20Strensall%20York%2C%20North%20Yorkshire%20YO​​32% 205YQ%2C%20United%20Kingdom @ 54.033922,-1.045047

It is because the coordinates that are passed in your direction request are https://maps.google.com/maps?ll=54.033922,-0.589114&z=7&t=m&hl=en-US&gl=US&mapclient=embed&daddr=Photographer%20in%20York%20118%20Middlecroft%20Drive%20Strensall%20York%2C%20North%20Yorkshire%20YO32%205YQ%2C%20United%20Kingdom@54.033922,-1.045047

纬度:54.033922
经度:-1.045047

Latitude : 54.033922 Longitude : -1.045047

当您点击方向链接时,您在Google地图上获得的地址是哪个。

Which is the address you are getting on the Google Maps when you click on the direction link.

您正在查看的地址的坐标是 118 Middlecroft Drive,Stren自主学习,约克,约克YO32 5YQ,英国

THe coordinates for the address you are looking which is 118 Middlecroft Drive, Strensall, York, York YO32 5YQ, UK are

纬度:54.0338228
经度:-1.0447040000000243

Latitude : 54.0338228 Longitude : -1.0447040000000243

请尝试将其明确地写入您的请求中,而不是对其进行地理编码!

Try putting this explicitly in your request instead of geocoding it!

这篇关于Google地图嵌入在路线中显示的地址不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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