简体   繁体   English

使用google maps api在我自己的服务器上映射

[英]maps on my own server with google maps api

I want to make a website that displays my map, has panning, zooming and other features. 我想创建一个显示我的地图的网站,具有平移,缩放和其他功能。 The google API seems to be the right thing for me. 谷歌API似乎对我来说是正确的。 Just one question : Can i use the google javascript api with my own map images on my own server. 只有一个问题:我可以在我自己的服务器上使用google javascript api和我自己的地图图像。 I dont want to use the actual google maps, just its capability to display zoomable/scrollable maps in a browser 我不想使用实际的谷歌地图,只是它能够在浏览器中显示可缩放/可滚动的地图

No, I don't think so. 不,我不这么认为。

You may also want to look at OpenStreetMap . 您可能还想查看OpenStreetMap I have seen custom map-images being used with its interface. 我看到自定义地图图像与其界面一起使用。

Technically this may be possible using the Overlays section ( Ground overlays allow image overlays on the map) of the API and hooking half a dozen events to handle the redrawing at different zoom levels, tiling, hiding the real information about whatever location Google Maps thinks it is showing, etc. 从技术上讲,这可能是使用API​​的覆盖部分( 地面覆盖允许地图上的图像叠加)并挂钩六个事件来处理不同缩放级别的重绘,平铺,隐藏有关谷歌地图认为的任何位置的真实信息正在展示等

But it is definitely not designed for such purposes and I'm not sure if it would be legal to use it in that way, would have to read the license. 但它绝对不是为这样的目的设计的,我不确定以这种方式使用它是否合法,必须阅读许可证。

There are other alternatives out there that would be able to achieve this functionality without the level of work needed to get Google Maps to cooperate I believe. 除此之外,还有其他替代方案可以实现此功能,而无需让Google Map合作所需的工作量。

I think you'll find that the Google maps interactivity code is geared towards working with Google map servers for the underlying map. 我想你会发现谷歌地图交互代码是为了与底层地图的谷歌地图服务器合作。 However, you could put your own layers over their maps and then serve up your own content so long as it used the same mapping co-ordinates. 但是,您可以将自己的图层放在地图上 ,然后提供自己的内容,只要它使用相同的映射坐标即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM