开发者

What language to use to create maps dynamically

开发者 https://www.devze.com 2023-01-29 12:17 出处:网络
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

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 o开发者_如何学Pythonptional. 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


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号