...
There are a couple of requirements that must be met before this can occur though:
- The client configuration must be setup to utilise fixed scales and they must match those of the ArcGIS server map cache.
- The users browser must be able to directly connect to ArcGIS server (unless you're using a pre-generated tile cache being served directly via a web server).
If the version of ArcGIS server you're running supports it then the update will work with:
- Fused and multi-layer map caches
- Dynamic and pre-generated map caches
- Compressed and exploded map caches
Info |
---|
There is additional information for configuring tiled map engines at Tiled Map Engine. Specifically the sections of tile subsets and server resolutions. |
Configuring the server side map engine
...
Code Block |
---|
|
<arcgisws:mapserver id="raster.fused">
<url>http://arcserver:8399/arcgis/services/AerialPhotography/MapServer</url>
<format>image/jpg</format>
<transparent>false</transparent>
<background>white</background>
<selection>false</selection>
<acetate>false</acetate>
</arcgisws:mapserver>
|
...
Code Block |
---|
|
<arcgisws:mapserver id="raster.multilayer">
<url>http://arcserver:8399/arcgis/services/Water/MapServer</url>
<format>image/png</format>
<transparent>true</transparent>
<selection>false</selection>
<acetate>false</acetate>
</arcgisws:mapserver>
|
...
Code Block |
---|
|
<arcgisws:mapserver id="vector">
<url>http://arcserver:8399/arcgis/services/Main/MapServer</url>
<format>image/png</format>
<transparent>true</transparent>
</arcgisws:mapserver>
|
...
Code Block |
---|
|
<toc:model id="sample">
<mapengine>vector</mapengine>
<entry label="Roads" layer="0"/>
<entry label="Properties" layer="1"/>
<entry label="Suburbs" layer="2"/>
<entry label="Water Valves" mapengine="raster.multilayer" layer="0"/>
<entry label="Water Pipes" mapengine="raster.multilayer" layer="1"/>
<entry label="Aerial Photography" mapengine="raster.fused" layer="0"/>
</toc:model>
|
...
Code Block |
---|
|
<client:config id="sample">
<!-- standard config items appear here -->
<view id="com.cohga.html.client.map.mapView">
<!-- standard map view config items appear here -->
<!-- we must set the scale to match the map caches -->
<scales>
<scale>1000</scale>
<scale>10000</scale>
<scale>100000</scale>
<scale>1000000</scale>
</scales>
<!-- now add the three map engines -->
<mapEngine id="raster.fused">
<options>
<transitionEffect>resize</transitionEffect>
<alpha>true</alpha>
</options>
</mapEngine>
<mapEngine id="raster.multilayer"/>
<options>
<transitionEffect>resize</transitionEffect>
<alpha>true</alpha>
</options>
</mapEngine>
<mapEngine id="vector">
<options>
<transitionEffect>resize</transitionEffect>
<alpha>true</alpha>
<ratio>1.2</ratio>
</options>
</mapEngine>
</view>
</client:config>
|
This would display the three map engines and the user will be able to turn any of the six layers on and off.
That should be enough, if map caches are enabled the user will utilise them. If the map caches were deleted for the map engines then the client will still work, but it will communicate with the Weave server to generate it's images.
Aligning a tile cache
Warning |
---|
This section on aligning tile caches is no longer applicable, as of release 2.5.22, manually aligning tile caches should not be required. If your tiles do not line up there is likely a separate configuration issue. |
Sometimes the tile cache will not align exactly with the vector data, this can be corrected by specifying a tileOffset
, in either the server map engine or client map engine configs. The tileOffset
specifies an x and y shift that should be performed on the tiles before being displayed.
If we wanted to fix the fused map cache in the server configuration then we'd change it to
Code Block |
---|
|
<arcgisws:mapserver id="raster.fused">
<url>http://arcserver:8399/arcgis/services/AerialPhotography/MapServer</url>
<format>image/jpg</format>
<transparent>false</transparent>
<background>white</background>
<selection>false</selection>
<acetate>false</acetate>
<tileOffset x="-15.5" y="6"/>
</arcgisws:mapserver>
|
...
Code Block |
---|
|
<mapEngine id="raster.fused">
<options>
<transitionEffect>resize</transitionEffect>
<alpha>true</alpha>
<tileOffset x="-15.5" y="6"/>
</options>
</mapEngine>
|
Unfortunately you'll need to figure out the correct values for x and y by trial and error (the measure distance tool in the Weave client can help here).
Generally setting the tileOffset
in the server config would be better since it only needs to be done once.
...
Code Block |
---|
|
<mapEngine id="raster.fused">
<url>http://arcserver/arcgiscache/AerialPhotography/Layers/_alllayers</url>
<options>
<useArcGISServer>false</useArcGISServer>
<type>jpg</type>
<transitionEffect>resize</transitionEffect>
<alpha>true</alpha>
<tileOffset x="-15.5" y="6"/>
</options>
</mapEngine>
|
...
Code Block |
---|
| xml |
---|
| xml |
---|
title | Disabling the use of client side tile caching. |
---|
linenumbers | true |
---|
|
<mapEngine id="raster.fused">
<type>weave</type>
<options>
<type>jpg</type>
<transitionEffect>resize</transitionEffect>
<alpha>true</alpha>
</options>
</mapEngine>
|
...
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>
|
...
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>
|
Warning |
---|
If you receive errors from ArcGIS Server related to invalid chunk sizes, when generating maps on the server add
<fetchThreads>1</fetchThreads> to the server side arcgisws:mapserver map engine configuration |