关于根据 IP 地址[字面意思]映射位置的问题
我最近很无聊,我想开始一个新项目。我正在查看另一个问题中提到的网站(http://www.grapevinegame.com/) ,我认为这张地图以及它如何根据某人的 IP(我认为)绘制一个点非常漂亮。我想做类似的事情,但我不知道如何做到。我知道您可以使用一些已经编写的脚本,但是你如何将它们绘制在世界地图上呢?我在其他地方也看到过它,比如 Google Analytics 等。
这似乎是一件很巧妙的事情,所以我只是想知道到底该怎么做。 (在地图上绘制位置并在它们之间“绘制”一条路线。)
I've been bored lately and I want to start a new project. I was looking at a website mentioned in a different question (http://www.grapevinegame.com/), and I thought the map and how it plots a point based on someone's IP (I assume) is pretty nifty. I want to do something like that, but I have no idea how it's done. I know you can get latitude and longitude, city and state, and some more with some already-written scripts, but how would you plot those on a map of the world? I've seen it other places, like Google Analytics and such, as well.
It seems like a neat thing to be able to do, so I was just wondering how exactly to go about doing it. (Plotting the locations on a map and "drawing" a route between them.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
给定纬度和经度,只需使用地图 API 即可,例如 Google Maps API ,在浏览器中显示一组点(其中一个点是纬度/经度对)。您有更具体的问题吗?
Given latitude and longitude, it's just a matter of using a map API, like Google Maps API, to display a set of points (where a point is a lat/lng pair) in a browser. Did you have a more specific question?