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

Local MapTiles

May 6, 2015 at 1:45 PM
Totally newbie in this. I'm trying to use local map tiles instead of a tile http server, but I fail on how to define a relative location for the tilesource.

If using the example provided, on which you define an absolute path, it works ok, but that won't work if the application is stored elsewhere.

Is it even possible? Thanks in advance.
Coordinator
May 6, 2015 at 2:10 PM
The TileSource class does not support relative file URIs. You may however create a TileSource in code behind and set the UriFormat property to an absolute path that is constructed from your application's current working directory plus the relative path.

Or you create a derived ImageTileSource and override the LoadImage method, which loads tile bitmaps from wherever you like.
May 6, 2015 at 2:35 PM
Hmm thanks for the confirmation of not being actually possible. I was thinking on coding it as you suggested, so I will probably try that. Shouldn't be too difficult. Thanks for the fast answer.
Coordinator
May 7, 2015 at 7:22 AM
After taking a closer look I've found an easy way to add support for relative file paths. I will soon release the next version that includes this feature