문제

I'm trying to use MultiScaleImage in a WP8 app with local source. I've composed the image structure using Deep Zoom Composer and added the files to the app project.

<MultiScaleImage x:Name="ImageMap" Source="Map/dzc_output.xml" />

The above doesn't work, no errors, just doesn't display anything. I also tried setting the source from code, but no success.

ImageMap.Source = new DeepZoomImageTileSource()
{
    UriSource = new Uri("file:///Map/dzc_output.xml")
};

I did not try with remote source - for purposes of this application I need strictly local source. Sadly, the documentation is very poor on explaining how this (or if) can be done in Windows Phone. Has anyone attempted this before?

도움이 되었습니까?

해결책

MultiScaleImage doesn't support local images as tile source. There was proposal to support local storage, but it was not accepted.

https://wpdev.uservoice.com/forums/110705-dev-platform/suggestions/1946653-deep-zoom-pan-multiscale-image

다른 팁

Please try these path formats:

windows phone file path format

ms-appx:// is good.

if ms-appx:// doesn't work, you can try Package.Current.InstalledLocation.Path or ApplicationData.Current.LocalFolder to get your installation path. Then append your file path, it works in code-behind.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top