简体   繁体   English

OpenLayers中的混合缩放?

[英]hybrid zoom in OpenLayers?

I'm basically putting an OpenLayers application on a DVD that cannot count on Internet connectivity. 我基本上是将OpenLayers应用程序放在无法依靠Internet连接的DVD上。 I've included a base layer on the DVD covering zoom levels 1-9 (due to space limitations). 我在DVD上添加了一个基本层,覆盖了1-9的缩放级别(由于空间限制)。 There are various other tiled overlays up to zoom level 17 also included on the DVD. DVD上还包含各种其他平铺覆盖层,最高可达到缩放级别17。

If I detect Internet connectivity, I augment the local base layers 1-9 with a tile service from levels 10-17. 如果检测到Internet连接,则会使用10-17级的切片服务扩展本地基础层1-9。 If I don't detect an internet connection, I show a transparent tile for the base layer at zoom levels 10-17 so the user can still explore the overlays at those zoom levels. 如果未检测到Internet连接,则会在缩放级别10-17处显示基础层的透明磁贴,以便用户仍可以在这些缩放级别上浏览叠加层。

Instead of showing a transparent tile when there is no connectivity for the base layer, is there a way to show the last local zoom level (9) of base layer tiles at levels 10-17, but zoomed in? 有没有办法在基础层没有连接时显示透明的图块,而是可以显示在第10-17级但放大的基础层图块的最新局部缩放级别(9)? I understand that they will become more pixelated as you zoom in, but I think pixelated reference tiles are better than nothing in this situation. 我知道当您放大时它们会变得更加像素化,但是我认为在这种情况下像素化参考图块总比没有好。 I thought I had read about this at one point while going through the mass of OpenLayers documentation/examples, but now that I need it, I obviously can't find it. 我以为在浏览大量OpenLayers文档/示例时曾经读过这一点,但是现在我需要它,很显然我找不到它。

Thanks. 谢谢。

You should take a look at OpenLayer's ClientZoom: http://openlayers.org/dev/examples/clientzoom.html . 您应该看一下OpenLayer的ClientZoom: http ://openlayers.org/dev/examples/clientzoom.html。 Looks like it's what you're looking for. 看起来就是您要的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM