Silverlight 中的本地 DeepZoom / MultiScaleTileSource
如何提供可以在本地生成图像(即无需下载图像数据)的 MultiScaleTileSource 实现?
这是后续:后续:stackoverflow.com/questions/432956/silverlight-make-deepzoom-to-load-tiles-from-local-source 没有得到答复。
网络上的所有示例最终都基于 http://blogs.msdn.com/mikeormond/archive/2008/08/23/multiscaletilesource-demo-source-code.aspx 它通过在服务器上生成像素来专门“破解”该问题。
How to provide a MultiScaleTileSource implementation that can generate images locally (i.e. without downloading of the image data)?
This is a follow up to : Follow up on: stackoverflow.com/questions/432956/silverlight-make-deepzoom-to-load-tiles-from-local-source which did not get answered.
All samples on the web end up to be based on http://blogs.msdn.com/mikeormond/archive/2008/08/23/multiscaletilesource-demo-source-code.aspx which specifically "hacks" the issue by generating pixel on the server.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
更新:我认为不可能完全在客户端上进行深度缩放。 MultiScaleTileSource.GetTileLayers 需要URI 的集合,我认为您没有办法在客户端拦截它。
但是,您可以使用 Silverlight 3 的 WriteableBitmap 在客户端生成内容。 我不知道你到底想做什么,但是 Jeff Prosise 编写了一个示例,显示通过可写位图缩放到 Mandelbrot 集,它展示了这一概念。
----------- 原始答案 -------------
创建自定义 MultiScaleTileSource - 继承自 MultiScaleTileSource 并重写 GetTileLayers 方法。
示例:
UPDATE: I don't believe it's possble to do Deep Zoom completely on the client. MultiScaleTileSource.GetTileLayers requires a collection of URI's, and I don't think you have a way to intercept that on the client.
However, you could use Silverlight 3's WriteableBitmap to generate content on the client. I don't know exactly what you're trying to do exacly, but Jeff Prosise wrote an example which shows zooming into a Mandelbrot Set via Writeable Bitmaps, which shows the concept.
----------- original answer -------------
Create a custom MultiScaleTileSource - inherit from MultiScaleTileSource and override GetTileLayers method.
Samples: