5

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.

Thijs van Dien
  • 6,516
  • 1
  • 29
  • 48
  • Here is a link to a GIS summary page, listing free and commercial Delphi components: [GisWiki](http://www.giswiki.org/wiki/Delphi). – LU RD Oct 22 '12 at 16:00
  • as a third option, take a look at ESRI Shape files (.shp) and TeeChart (I used it for creating maps like [this one](http://blog.karelia.pro/teran/files/2010/06/chartmapper_1.png) ). but seems it is overcomplicated for this task. Every shape in .shp map has own id, and description of such id is stored in dbf file. – teran Oct 22 '12 at 16:01
  • @LURD I updated my post to specify that one should think of the map as a floor map. I'm not sure if a GIS system is appropriate for that. It could very well be overkill. – Thijs van Dien Oct 22 '12 at 16:06
  • @tvdien, sorry, a GIS system would indeed be an overkill for a floor map. – LU RD Oct 22 '12 at 16:48
  • 1
    If you are looking for some Delphi SVG libraries, see [NativeSVG](http://www.simdesign.nl/nativesvg.html) or [AggPas](http://www.crossgl.com/aggpas/). – LU RD Oct 22 '12 at 17:36
  • @LURD I have found some SVG libraries, but none of them seem able to act on the elements like TSVG can. Of course, CMIIW. – Thijs van Dien Oct 22 '12 at 17:46
  • This delphi code does some interactive stuff with svg data: http://exit graph.sourceforge.net/index.html Maybe it does what you need? I didn't try it myself yet, so let me know if it's useful. – Wouter van Nifterick Oct 22 '12 at 18:37
  • @WoutervanNifterick Please fix your link. – Thijs van Dien Oct 22 '12 at 19:10
  • @tvdien argh.. stupid spell checker. i cannot edit anymore, but this is the page i still had in another tab: http://extgraph.sourceforge.net/docs/howto/svgclocks.htm It points you to a page of the extgraph project that explains how to work with svg. Anyway, i'm not sure if it's going to be easy to extract the relevant parts. – Wouter van Nifterick Oct 23 '12 at 00:02
  • I realize you rejected the GIS route but in case you reconsider, there is an open-source Active X control very similar to ESRI MapObjects that I have used with success. MapWinGIS - http://mapwingis.codeplex.com/ – Alan Clark Oct 23 '12 at 06:22

1 Answers1

0

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

Thijs van Dien
  • 6,516
  • 1
  • 29
  • 48