This project has moved. For the latest updates, please go here.

How to use offline map data

Aug 21, 2014 at 11:04 AM
Hi,

first of all, I want to thank you all for creating such a great map control. It is really promising!

I'm currently working on a C#/WPF application (.NET FW 4.0) which should be able to display an interactive map just using offline data.
So, I thought of putting an OSM file like SomeCountry.osm.pbf right beside my app and let the map control pull the needed data from this at runtime?
I don't want to set up/manage a local Tile Server, but maybe there are assemblies/libraries which can do this (i.e. BruTile?).

Is that possible, which way would be the best/easiest to to this?
Maybe somebody has already done something like that with .NET on Windows?

Regards,
Helmut
Aug 21, 2014 at 6:18 PM
Edited Aug 21, 2014 at 6:18 PM
Hi ClemensF,
You'll need to have a local tile server, because the map control can only render tile bitmaps.
I see, but is it possible to integrate this Tile Server functionality in my application, i.e. by using an third party assembly I can reference?
If no direct integration is possible, there might be a chance to call a process and control it by command line parameters or whatever to get the needed tiles?

The application should be zero setup/zero administration (really easy with .NET FW), so I'd like to avoid a standalone local Tile Server installation.
It should be possible to run from an USB stick without any setup, like a portable app, and most importantly offline (without Internet connection).

Looking around in the Web I came across projects like BruTile or Maperitive, but I can't find any samples or hints how to use them with a map control like this one.
Maybe they are not suitable for this purpose anyway, I don't know (yet).

Regards,
Helmut
Coordinator
Aug 21, 2014 at 7:17 PM
You might derive from ImageTileSource and override its LoadImage method to provide whatever map tile image you want.
Marked as answer by hgiritzer on 8/28/2014 at 6:29 AM
Aug 25, 2014 at 6:03 AM
ClemensF wrote:
You might derive from ImageTileSource and override its LoadImage method to provide whatever map tile image you want.
Hi ClemensF,

thanks for pointing me to that, I just derived my own class from ImageTileSource as suggested and deliver tile images from a prebuilt SQLite database (similar to MBTiles schema).
I am using Maperitive to prepare this SQLite database.

Of course, it would be better to have a Tile Server functionality at hand to generate these tiles on the fly, but currently I am not aware of a .NET library that I could use for this purpose. I'll keep on searching...

Regards,
Helmut
Jan 16, 2015 at 2:02 PM
hgiritzer wrote:
ClemensF wrote:
You might derive from ImageTileSource and override its LoadImage method to provide whatever map tile image you want.
Hi ClemensF,

thanks for pointing me to that, I just derived my own class from ImageTileSource as suggested and deliver tile images from a prebuilt SQLite database (similar to MBTiles schema).
I am using Maperitive to prepare this SQLite database.

Of course, it would be better to have a Tile Server functionality at hand to generate these tiles on the fly, but currently I am not aware of a .NET library that I could use for this purpose. I'll keep on searching...

Regards,
Helmut
Hi hgiritzer, could you help me about creating the tiles database and to load on the map? I've to load the tiles of Italy at different zoom levels..