Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It is probably a roundabout way of going about it, but you might find some useful stuff in the javascript and XAML from <a href="http://www.silverlightearth.com/" rel="noreferrer">SilverlightEarth.com</a> which a Silverlight 1.0-based map-tile-client. It can load VE, Google, Yahoo (there is a <a href="http://www.silverlightearth.com/2/" rel="noreferrer">DeepZoom version</a> that can load OpenStreetMap, Moon and Mars too; but since it uses MSI it doesn't really help on the WPF 3/3.5 front).</p> <p>Although the javascript is a little untidy, you can clearly see it is creating a Silverlight 1.0 Xaml (dynamically sized) Canvas, filling it with tiles (Image controls) and handling zoom in/out and pan requests. You would need to make sense of all the javascript and convert it to C# - the XAML should mostly come into WPF unaltered. I have <a href="http://conceptdev.blogspot.com/2008/03/deepzoom-in-silverlight-10.html" rel="noreferrer">tested this Silverlight 1.0 with a Deep Zoom tile pyramid</a> (and <a href="http://conceptdev.blogspot.com/2008/03/deepzoom-in-silverlight-10-part-deux.html" rel="noreferrer">here</a>) so the concepts are applicable (ie. not just for maps).</p> <p>I know this works because I have done it myself to build the map viewer in <a href="http://geoquery2008.com/" rel="noreferrer">Geoquery2008.com</a> (<a href="http://geoquery2008.com/screenshots/072_Across180a.png" rel="noreferrer">screenshot</a>) which is WPF/c#. Unfortunately the Geoquery2008 assemblies are obfuscated, but you might still glean some ideas or useful code via DASM/Reflector. It is still a beta so I wouldn't claim it is 100% done. I hadn't really thought of factoring out the map code into a separate control but may I will look into that if another one doesn't appear...</p> <p>Incidentally I also started off with the ScrollViewer, but am planning to ditch it and mimic the javascript more closely so it's easier to re-use Image objects when panning/zooming (by gaining more control over the process than ScrollViewer provides).</p> <p>These MSDN pages on the <a href="http://msdn.microsoft.com/en-us/library/bb259689.aspx" rel="noreferrer">Virtual Earth tile system</a> and the <a href="http://msdn.microsoft.com/en-us/library/cc645077(VS.95).aspx" rel="noreferrer">Deep Zoom file format</a> and related links is probably also a useful reference.</p> <p>Finally - I guess you've seen since this post that DeepZoom/MultiScaleImage is likely to be in <a href="http://www.ddj.com/windows/211601295" rel="noreferrer">.NET 4.0/Studio 2010</a>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload