This project has moved and is read-only. For the latest updates, please go here.

Local MapTiles

May 6, 2015 at 2: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.
May 6, 2015 at 3: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 3: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.
May 7, 2015 at 8: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