构建自定义地图,如 gothere.sg

发布于 2024-08-03 00:06:21 字数 290 浏览 5 评论 0 原文

我正在寻找有关如何构建 gothere.sg 等自定义地图的参考。据我通过了解他们的架构了解到,他们正在使用自己的地图服务器(他们的可视化地图看起来非常漂亮)。在地理编码和许多其他功能方面,他们仍然依赖 Google 地图 API。

请发布您从 gothere.sg 中了解到的内容或提供类似的参考:

  1. 构建像 gothere.sg 这样的自定义地图
  2. 地图的自定义绘制

I am looking for a reference on how custom map like gothere.sg is built. As far as I can figure out from understanding their architecture, they are using their own map server (their visual map looks so beautiful). On geocoding and much other functionalities, they're still reliant on Google Maps API.

Please post what you understand from seeing gothere.sg or provide similar reference for:

  1. Building custom map like gothere.sg
  2. Custom plotting of the map

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

指尖凝香 2024-08-10 00:06:22

看起来他们正在使用自定义图块集来托管自己的地图图块,并使用 Google Maps API 进行平移/缩放操作:

从那里 源代码(代码被混淆,但有一些容易识别的位):

var Ag=new google.maps.TileLayer(
                new google.maps.CopyrightCollection("gothere.sg"),
                10,22,{isPng:true,opacity:1});

这是您在设置自己的 TileLayer 时要做的第一件事之一。

我之前回答过一个问题,其中包括实现此类事情的HowTo。您可以在这里找到它:

在 Google 地图中标记街道

在地图顶部设置自己的 GUI 元素以自定义其外观和感觉。

对评论的回应

在另一个答案中,我展示了一个自定义图块集实现的简单示例。您可以在此处找到它的文档:

http://code.google .com/apis/maps/documentation/overlays.html#Tile_Layer_Overlays

您可以将任何您喜欢的内容放入自定义图块集中,当然不限于 Google 绘制的城市。以下是自定义图块集的其他一些示例:

Looks like they are using a custom tileset to host there own map tiles and use the Google Maps API to do the panning/zooming stuff:

From there source (the code is obfuscated, but there are some easily recognizable bits):

var Ag=new google.maps.TileLayer(
                new google.maps.CopyrightCollection("gothere.sg"),
                10,22,{isPng:true,opacity:1});

This is one of the first things you have do do when you are setting up your own TileLayer.

I have answered a question previously which included a HowTo for implementing this sort of thing. You can find it here:

Marking streets in Google Maps

They are also setting up there own GUI elements on top of the map to customize their look and feel.

Response to comment:

In the other answer I show a simple example of a custom tileset implementation. You can find the doco for it here:

http://code.google.com/apis/maps/documentation/overlays.html#Tile_Layer_Overlays.

You can put anything you like in your custom tilesets, you certainly aren't limited to cities that Google has mapped. Here are a few other examples of custom tilesets:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文