0

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

sgbharadwaj
  • 395
  • 2
  • 5
  • 9
  • Clarification - I just need a way to create block diagram like figures on the sceen. Something like UML diagram, I am looking for UI framework/language/technology to create the diagrams which are clickable. I am using Java for the backend. – sgbharadwaj Dec 07 '10 at 16:09

2 Answers2

1

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.

Phrogz
  • 296,393
  • 112
  • 651
  • 745
0

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.

dave
  • 12,406
  • 10
  • 42
  • 59
  • Thanks but i just need a block diagrams like figures on the sceen. Something like UML diagram, I am looking for UI framework/language/technology to create the diagrams which are clickable. I am using Java for the backend. – sgbharadwaj Dec 07 '10 at 16:08
  • Thanks dave. Actually I do not need to display this info on a map. I just have to show the locations as say nodes in a graph (within a rectangle) and want the links and the nodes to be clickable. – sgbharadwaj Dec 07 '10 at 16:16