使用什么语言动态创建地图

发布于 2024-10-06 14:52:39 字数 552 浏览 6 评论 0原文

我想动态创建地图并将其显示在网站上。您可以将其称为图表而不是地图。这里我从数据库中获取源和目的地。一个目的地可以有多个源,一个源可以有多个目的地,或者两者都有。还可以有许多其他位置指向/来自源/目的地。来源和目的地将永远存在。但其他位置是可选的。例如,路线可以是

L1 --> L1 L2——>来源-->目的地--> L3——> L4。 其中 L1-L4 是位置(可选)

我想在网站上以图解方式描述这一点。用户应该能够单击每个位置/路径(如上面的箭头线所示),并且应该打开一个弹出窗口。在弹出窗口中可以进行一些数据编辑。此外,沿着路径(箭头线)还必须显示一些数据。基本上所有 HTML、JS 功能都适用于此图。

有人可以建议我可以使用哪种语言吗?

我检查了一些地图 API。但他们期望存在某种预加载的图像。在我的情况下这是不可能的。

我正在开发的网站与任何机票信息网站类似,我们选择多个城市并为不同的航空公司提供不同的价格。我想以图形方式显示这一点,其中节点代表位置,线条代表路径,并且应该显示沿路径的速率和类似的东西。

任何指示将不胜感激。

谢谢

I want to create a map dynamically and display it on the website. You can call it to be more of a graph than a map. Here I take the source and destination from the database. There can be many sources to a destination or many destinations for a source or both. Also there can be many other locations directed to/from source/destination. Source and Destination will always be there. But other locations are optional. So for example the route could be

L1 --> L2 --> Source --> Destination --> L3 --> L4.
where L1-L4 are locations (optional)

I want to depict this diagrammatically on a website. The user should be able to click on a each location/path (depicted as the arrow line above) and a popup should be opened. In the popup some data editing can take place. Also along the path(arrow line) some data has to be displayed. Basically all HTML,JS functionality should be available for this diagram.

Can someone please suggest me which language I can use for this?

I checked out some of the map APIs. But they expect some kind preloaded image to be present. That is not possible in my case.

The site I'm working on similar to any air fare info site, where we select multi city and get different rates for different airlines. I want to show this graphically with nodes representing locations and lines representing paths and should show rates along paths and stuff like that.

Any pointers will be appreciated.

Thanks

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

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

发布评论

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

评论(2

ぺ禁宫浮华殁 2024-10-13 14:52:39

您的一些选项是:SVGHTML Canvas,或 HTML+CSS。鉴于您希望跟踪每个对象的事件,我会排除 HTML Canvas:将事件绑定到保留的绘图系统中的对象比根据鼠标位置手动处理事件要容易得多。

我建议使用 SVG(如果您可以限制自己使用支持它的浏览器)或像 Raphaël 这样的绘图 API 来抽象支持 IE 的 SVG 和 VML。与使用 HTML div 加背景相比,您将拥有更大的绘图和命中检测灵活性。

虽然我没有使用过它,但 Google 发现 Joint 库(使用 Raphaël)比绘图水平。也许这可以满足您的需求。

Some of your options are: SVG, HTML Canvas, or HTML+CSS. Given your desire to track events per object, I would rule out HTML Canvas: binding events to objects in a retained drawing system is much easier than manually processing events based on mouse position.

I would recommend using either SVG (if you can limit yourself to browsers that support it) or a drawing API like Raphaël to abstract support over SVG and VML for IE. You will have far more flexibility of drawing and hit detection than using HTML divs plus backgrounds.

Although I haven't used it, Google found the Joint library (that uses Raphaël) for a higher abstraction than the drawing level. Perhaps this meets your needs.

迷离° 2024-10-13 14:52:39

如果我理解正确的话,听起来 google 地图 api 适合你:
您可以在这里找到更多信息。 此处

此外,您还可以找到此处。 google.com/apis/kml/documentation/kml_tut.html" rel="nofollow">此信息很有用。

If I understand you correctly, it sounds like the google maps api would work for you:
You can find more info here. here

Additionally, you may find this info useful.

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