...
As part of the process of setting up the client side map tiling the Weave server will set the client map engine type to either 'agstiled' or 'agsrest' (depending upon the type of map cache created in AGS, fused vs. multi layer) UNLESS it's already explicitly set to something. We can take advantage of this to set the map type to 'weave', which is the default if not specified anyway, thereby stopping the alterations from taking place.
Code Block |
---|
| xml |
---|
| xml |
---|
title | Disabling the use of client side tile caching. |
---|
|
Code Block |
---|
|
<mapEngine id="raster.fused">
<type>weave</type>
<options>
<type>jpg</type>
<transitionEffect>resize</transitionEffect>
<alpha>true</alpha>
</options>
</mapEngine>
|
forcing the client to contact the Weave server to generate map images.
Locally caching tiles
If you're accessing a remote AGS map engine and the response time from that engine is slow then you can turn on local caching of the tiles so that the Weave server will keep a local copy of each tile that's downloaded, this will improve the response the next time the tile is needed.
Code Block |
---|
| xml |
---|
| xml |
---|
title | Enabling local caching of tiles |
---|
linenumbers | true |
---|
|
<arcgisws:mapserver id="vector">
<url>http://arcserver:8399/arcgis/services/Main/MapServer</url>
<format>image/png</format>
<transparent>true</transparent>
<cachetiles>true</cachetiles>
</arcgisws:mapserver>
|
The tiles will be stored locally under the Weave directory at ...\weave\platform\workspace\.agscache unless a system properties called agscache.location
is set pointing to another directory location (allowing one local cache to be reused by multiple Weave instances).
Tiles can be set to expire after a certain period if it's believed that the underlying tiles will change over time, this is done by setting a cacheexpiry
value to the number of minutes that a tile should be valid for.
Code Block |
---|
| xml |
---|
| xml |
---|
title | Expiring tiles after 1 week |
---|
linenumbers | true |
---|
|
<arcgisws:mapserver id="vector">
<url>http://arcserver:8399/arcgis/services/Main/MapServer</url>
<format>image/png</format>
<transparent>true</transparent>
<cachetiles>true</cachetiles>
<cacheexpiry>10800</cacheexpiry>
</arcgisws:mapserver>
|