开放层投影
我想缩放到谷歌地图中的特定房屋,但是当我提供其边界以及纬度和经度时,它不会显示图像以及特定房屋。任何人都可以为此提供解决方案吗?
I want to zoom to a particular house in the google mapS, but when I provide its bounds and lattitude and longitude, it does not show images as well as the particular house. Can anyone provide the solution for this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
解决方案可能是首先传输坐标。不幸的是,当您将坐标传递给 OpanLayers.LonLat(lon,lat) 时,它应该是 WGS:84,而 OpenLayer.Bounds() 需要 EPSG:900913 中给出的坐标。
然后,您应该使用 Proj4js.transform 并在 EPSG:900913 中传递转换后的坐标
Solution would be probably to transporm coordinates first. Unfortunately when You pass coordinates to OpanLayers.LonLat(lon,lat) it is supposed to be WGS:84, while OpenLayer.Bounds() needs coordinates given in EPSG:900913.
You should then use Proj4js.transform and pass transformed coordintes in EPSG:900913
你可以像这样改造它:
You can transform it like this one: