Tiled WMS overlay in Windows Phone 8

WP8WMSUpdate May 2014: version for Windows Phone 8.1 is here: https://blog.sumbera.com/2014/05/23/wms-overlay-on-windows-8-1-and-windows-phone-8-1/ 

Looking on Windows Phone 8 Map SDK, I have tried to migrate a simple WMS overlay from Windows   Phone 7 (Bing map) – blogged here : https://blog.sumbera.com/2010/11/07/tiled-wms-overlay-in-windows-phone-7/

Changes :

– for migration you have to add before migration System.Core into the project (had to edit manualy proj file and add it there)

-Change from *.Controls.Map to *Map.Controls

– XAML definition

 <maps:Map x:Name="sampleMap"
 LandmarksEnabled="False"
 Loaded="sampleMap_Loaded"
 CartographicMode="Hybrid"                    
 Center="49.320574,16.68942"
 ZoomLevel="14" />

Loading TileSource:

private void sampleMap_Loaded(object sender, RoutedEventArgs e)
{
MapsSettings.ApplicationContext.ApplicationId = "<applicationid>";
MapsSettings.ApplicationContext.AuthenticationToken = "<authenticationtoken>";
TileSource wmsTileSource = new WMSTile();
sampleMap.TileSources.Add(wmsTileSource);
}

..then in your TileSource you can use as usual your method GetUri.

Sample code based on Microsoft Sample can be downloaded here: www.sumbera.com/lab/WP8/WMSonWP8.zip

This entry was posted in .NET, Code, Uncategorized, Windows Phone 8, WMS and tagged , . Bookmark the permalink.

3 Responses to Tiled WMS overlay in Windows Phone 8

  1. Pingback: Tiled WMS overlay in Windows Phone 7 | Geospatial Haiku

  2. Pingback: Windows Phone 7 and WMS test | Geospatial Haiku

  3. Stéphane says:

    Thanks for your post !
    This code is working great on the emulator but doesn’t display wms layer on a real device :/
    Any idea ?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s