The Map View tab in SuperWEB2 requires a connection to an external map server to obtain both the geographical shapes used in the layers (for example, the shapes of the states and suburbs that will be overlaid onto the map as coloured layers) and the imagery used in the tiles of the underlying map.
To increase the performance of Map View, SuperWEB2 has two caching mechanisms. These mechanisms keep local copies of the information required to display the map, so that it is not necessary to query the external server every time a user loads a map.
The geometry cache is activated by default and cannot be turned off. It automatically keeps a local copy of the geographical shape data from the mapping server. These cached files are saved in the following location by default (see below for details on changing the location of the cache directory): <tomcat_home>\work\Catalina\localhost\webapi.
If the ArcGIS server geography changes, you will need to delete the local cache and restart the SuperWEB2 server:
- Update the geographies in your external ArcGIS server.
- Stop Tomcat/the SuperWEB2 service.
Delete the relevant cache files for the layer you want to update.
The names of the cache files follow this convention:
<arcgis_host>indicates the host name of the ArcGIS server.
<arcgis_service>indicates the name of the service on the ArcGIS server that is providing the geographical layer data.
<layer_id>indicates the ID (from ArcGIS) of the layer data this file contains.
<spatial_reference>is the ArcGIS spatial reference for this layer.
You can therefore find the appropriate files by checking the layer ID in the filename (there may be multiple cache files for a particular layer).
- Restart Tomcat/the SuperWEB2 service.
- Generate a map containing the new geography to populate the cache with the new data from the map server.
Mapping also has a special mode you can activate that allows you to run SuperWEB2 without an active connection to the ArcGIS server. To use this feature, you need to first populate SuperWEB2's cache of mapping data with geographical data for all your thematic layers. Once you have populated the cache, you can turn off the ArcGIS server and continue to use Map View without an active connection to ArcGIS.
Activate Disconnected Mode
To use this mode:
- Populate the cache by doing the following:
- Generate a map in Map View for all levels of all mapping hierarchies and for all datasets. This will create cache files in the cache directory (<tomcat_home>\work\Catalina\localhost\webapi by default).
- Download a KMZ file for each level of all mapping hierarchies. This will create an additional file in the cache directory.
In SuperADMIN, use the following command to turn on disconnected mode:
For each thematic layer, remove the
dynamicImageServiceURLsettings. You will also need to remove these settings from the defaults layer, if they have been defined there. For example:
Once you have completed these steps, SuperWEB2 will have enough cached mapping information to run without an active connection to the ArcGIS server.
Refresh the Cache
If the geographical data changes you will will need to repopulate the cache, as follows:
- Ensure the ArcGIS server is available.
- Add the
dynamicImageServiceURLsettings back into the mapping configuration in SuperADMIN.
- Clear the contents of the SuperWEB2 mapping cache directory (<tomcat_home>\work\Catalina\localhost\webapi).
- Use Map View to regenerate maps for all levels of all hierarchies, and re-download KMZ files for every level of the mapping hierarchies.
- Once you have completed these steps to regenerate the cache, you can remove the
dynamicImageServiceURLsettings in SuperADMIN.
By default, SuperWEB2 generates the mapping cache files in <tomcat_home>\work\Catalina\localhost\webapi, but you can configure SuperWEB2 to write to another directory if necessary:
- Open <tomcat_home>\webapps\webapi\WEB-INF\classes\configuration.properties in a text editor.
Locate the following property:
Set this to the full path to the directory you want to use. Make sure that the directory exists and that the user running Tomcat has permission to write to it. If you are using Windows, you must escape each slash in the file path with an additional slash. For example:
- Save your changes and restart Tomcat or the SuperWEB2 service.