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

OpenRailwayMap integration

Mar 5, 2015 at 10:50 AM
e need the OpenRailwayMap layer for our project and our goal is to load it over the openstreetmap layer.
If we just change the tile-url, the behavior of the map control is kind of strange (tile-url of OpenRailwayMap: http://{c}{z}/{x}/{y}.png)

The tiles of OpenRailwayMap are 512px big.
We also tried to resize them after downloading, but didn't get a proper solution yet.

It looks like the rendering is working fine, but images from old zoom are not disapearing correctly.
does anybody have an idea how we could correctly integrate openrailwaymap into xaml map control?
Mar 5, 2015 at 12:00 PM
I finally got the solution by changing the seamarks tile source to the one of the openrailway map.
But I cannot find a reason for why it is not working if I change the tile source of openstreetmap.
Mar 5, 2015 at 12:19 PM
Edited Mar 5, 2015 at 12:19 PM
The reason is that XAML Map Control simply does not support 512x512 map tiles. There are a lot of internal calculations where it uses a fixed tile size of 256px. What you see now may accidentally be what you expect to see, but it is quite certainly not correct, i.e. the map content is not displayed where it should be. I'll soon have a look into this, but I guess it won't be easily integrable.
Mar 5, 2015 at 3:58 PM
We did not have any problems so far, it seems to work fine without any changes. But we have a different behavior on the NuGet Version, than on the latest version from codeplex. Have you may forgotten to increment the version number?
Mar 6, 2015 at 3:37 PM
Edited Mar 6, 2015 at 4:31 PM
OpenRailwayMap content is meant to be used as semi-transparent overlay. It can't be used in a base layer, because you would see the base layer's lower zoom levels through the transparent background of the tile bitmaps. As you have already noticed, you would have to use them like the OpenSeaMap overlay in the sample application.

Regarding the tile size I have to correct myself. Although the map tile images from the server are 512x512 pixels, the map control displays them in an Image control with Width=256 and Height=256, so that they are displayed correctly. No idea however why OpenRailwayMap provides their content this way.