OpenLayers, Layers: Tiled vs. single tile
Each time we add a new layer to our OpenLayers based website (data provided primarily by a GeoServer server), we discuss whether to use a single-tile or a tiled approach.
Some of the parameters we evaluate are the following:
Using the tiled approach we get:
- Slow but continuous buildup of the viewport
- Lots of small images
- Client side caching possibilities
- Blocking of the loading pipeline (6 requests at a time)
- Jerky feeling when navigating during load
Using the single-tile approach we get:
- Smoother feeling when navigating during load
- Time delay before layer is loaded
- One large image for each layer
- No caching of the single tile
We have a lot of data editing in the layers, thus a tile-cache might not be that efficient.
Are there any best-practices when it c开发者_开发百科omes to tiling?
Progressing towards infinitely fast hardware and unlimited data connections, the discussion becomes irrelevant, but what configuration do you percieve as the most user-pleasing?
Most user pleasing IMO would be instant feedback via the gradual loading of tiles after any pan or zoom. I've only really used single tiles for custom reports at scales or sizes that don't correspond to my tiles.
Its not sure from your post how you are serving your data. Is each dataset served from a separate WMS service, or combined into one?
You can always group layers which change rarely and set these to use cached tiles, and for often edited layers have them as separate non-cached single tile layers (or shorter cache times).
The main issue with tiles is the number you can load in at at any one time. If you speed this up then there may be no noticeable difference in speeds.
For tile performance:
- You can double the number of tiles that load at a time by using two different domains to load tiles e.g. imsg1.maps.com and imgs2.maps.com
- You can reduce the buffer of tiles around the viewport so only visible tiles are loaded.
- There are a number of performance tips at http://trac.mapfish.org/trac/mapfish/wiki/HowToOptimize
Assuming you are using WMS then the following links may help decide on "best-practice":
- http://wiki.osgeo.org/wiki/WMS_Tiling_Client_Recommendation
- http://wiki.osgeo.org/wiki/FOSS4G_2006_Tiling_BOF
精彩评论