Search code examples
delphisvgdelphi-2010vcl

How to implement a user definable interactive map in Delphi 2010?


I'd like to have an interactive floor map (so they're not huge) in my application. The maps will be different for every user, but contain similar elements which only differ by quantity and location. The application will show the map, identify certain elements and link them to information from the database.

To design and store the map, I'd rather not roll my own editor and/or come up with some custom file format. However, it would be nice if the format were open and easily readable. SVG seems to be the perfect candidate for the job. All there needs to be is a convention of how to name the elements to make them identifiable. But how to go from there? I need something that can render the SVG and distinguish between the different layers.

TSVG can do exactly this but depends on FireMonkey which I'd rather avoid - it's not even present in Delphi 2010, so I'd have to use another version and do DLL tricks.

Another option would be to use the Chromium Embedded Framework and create the map using HTML, CSS and JavaScript. That feels very bulky, and would be hard to get right.

Are there any simpler ways to do this that I overlooked, either using SVG or perhaps something completely different?

I'm not sure if a GIS system is appropriate for this. It may very well be overkill.


Solution

  • In the end I decided to go for D3.js using Chromium Embedded, to have a flexible and more portable solution.