可点击的大陆/国家地图:该走哪条路?

发布于 2024-12-27 14:20:18 字数 513 浏览 2 评论 0原文

许多网站都包含可点击的地图,这些地图可以在鼠标悬停时突出显示区域,并允许用户将选择范围从世界地图视图缩小到大陆级别。这是一个有趣的示例:davidlynch.org

许多可点击的地图都是使用 HTML 图像地图实现的,而另一种选择是使用 Google 的 GeoChart API。关于 HTML 图像地图选项,我想知道人们从哪里获得所有“原始数据”、所有国家和地区边界多边形。有免费的资源吗?关于 Google GeoChart 选项,我想知道它是否可扩展,或者 API 调用的数量是否受到某种限制?

有人对免费库的可用性有一些建议,该库允许直接实现具有可定制区域的可点击地图吗?

There are many Web sites that include clickable maps that highlight regions on mouseover and allow the user to narrow down a selection from a world map view to a continent level. Here is an interesting example: davidlynch.org.

Many of these clickable maps are implemented with HTML image maps, while another option is to use for example Google's GeoChart API. Concerning the HTML image maps option, I'm wondering where people get all the 'raw data', all the country and regional border polygons. Is there a free resource for that? Concerning the Google GeoChart option, I'm wondering if that is scalable or if the number of API calls are somehow limited?

Does anyone have some advice on the availability of a free library that allows a straightforward implementation of clickable maps with customizable regions?

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

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

发布评论

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

评论(4

神回复 2025-01-03 14:20:18

嗯,这实际上并不是一个可以标记为“地理编码”的问题。

由于这些天我一直在玩 Raphael.js,所以在阅读您的问题标题时我想到了这个库。我还记得维基共享资源上有一张 SVG 世界地图。 Raphael 可以帮助您操作 svg 文件,因此这可能是一个不错的方法。
不管怎样,在搜索了“拉斐尔”标准后,我发现了一个完全符合您的要求的对话。就这样: http://groups.google.com/group/raphaeljs/browse_thread/thread/46b5402c677ce274/7ff6a6a8d8f5f9fa?pli=1

有一些实用脚本,以及上面提到的 svg world 文件的链接和一个实例(以及 Stack Exchange 主题的链接)。
当然还有工作要做,直接调用 google api 可能会更容易。

根据我对 gmaps API 的经验,你必须每秒发出许多请求才能被谷歌列入黑名单。就像当您启动大批量地理编码工具时一样。所以这取决于你的项目,但我认为即使你的页面很受欢迎,使用它也很安全。

[编辑]:现在有一个 现场演示RaphaelJ 网站

[再次编辑]:现在存在基于 Python 和 Raphael 的完整生产工作流程:Kartograph。它确实很年轻,但看起来很有前途。

Well it is not really a problem which could be tagged 'geocoding'.

Since I have been playing with Raphael.js these days, I thought of this lib while reading your question title. I also remember Wikipedia commons hosted a SVG map of the world. Raphael helps you manipulate svg files, so that could be a nice way to go.
Anyway, after searching whith the criteria 'raphael' I found a conversation matching your request, exactly. So there it is : http://groups.google.com/group/raphaeljs/browse_thread/thread/46b5402c677ce274/7ff6a6a8d8f5f9fa?pli=1

There are some utility scripts, as well as the link to the svg world file mentioned above and a live examples (and links to Stack Exchange topics).
Sure there is work to do, and it may be easier to call directly the google api.

In my experience of the gmaps API, you have to make many requests per second to be blacklisted by google. Like when you launch a heavy batch geocoding tool. So it depends of your project but I would consider quite safe to use it even if your page is popular.

[EDIT] : There is now a live demo on RaphaelJs website.

[EDIT again]: And now a complete production workflow based on Python and Raphael exists : Kartograph. It's really young but looks promising.

很快妥协 2025-01-03 14:20:18

看看这个。似乎满足您的要求并提供更多:
具有可点击区域的 Google 地图
http://codecanyon.net/item/google-maps-with-clickable -国家/3186942

Check this out. Seems to serve your requirements and offers a bit more:
Google Maps with Clickable Regions
http://codecanyon.net/item/google-maps-with-clickable-countries/3186942

回忆追雨的时光 2025-01-03 14:20:18

我支持 raphael.js,它是一个很好的库,可以通过各种用户交互来绘制形状。例如,您可以查看此项目,这是俄罗斯的矢量地图,在Raphael.js 的顶部。它允许以编程方式突出显示区域。

I second the raphael.js, it is a nice library to draw the shapes with all kinds of user interaction. As an example, you may look at this project, which is a vector map of Russia, implemented on top of the Raphael.js. It allows highlighting the regions programmatically.

昔日梦未散 2025-01-03 14:20:18

毫无疑问,我可以推荐两个库:1. d3JS 和 2. Raphael JS

后者是我用来编写我的

可点击地图生成器 Web 应用程序 - 制作可点击地图

d3JS 的学习曲线更陡峭,但你可以用它做比 Raphael 更多的事情。另一方面,拉斐尔更容易上手并且合作起来很有趣。

There are two libraries I can recommend without doubt: 1. d3JS and 2. Raphael JS

The latter is what I was using for writing my

clickable map generator web application - Make a Clickable Map

d3JS has a steeper learning curve, but you can do way more things with it than Raphael. On the other hand, Raphael is easier to pick up and is fun to work with.

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