In OpenLayers
3, there is is ol.source.TileWMS
and ol.source.ImageWMS
. I don't know if this is specific to OpenLayers
, but what are the trade-offs between tileWMS and imageWMS? Is there a performance difference? Other trade-offs?
1 Answer
If used with a WMS source, they're the equivalent of OpenLayers 2's singleTile
parameter. As @Tim Schaub described in this letter, the TileWMS
slices the map, requests a grid of images, then mosaics them together. It gives better performance, then ImageWMS
(which gets the viewport in a single image), but can generate duplicates of labels (if there is a label defined in the map server's layer configuration, the server sends the label with every requested image, i.e. for every image in the grid).
TileWMS
also can be used with a WMTS source.
Furthermore, TileWMS
seems to be a little blurry, maybe a developer knows why.
Map with a TileWMS
source:
Same map with an ImageWMS
source:
-
-
2Furthermore, TileWMS seems to be a little blurry, maybe a developer knows why ~ possibly because the tile image is stretched/squashed slightly, to fit into the grid– nmtokenMar 23, 2017 at 15:40