Creating Your Own Tile Caching Mechanism - Latest

Spectrum Spatial Guide

Product type
Software
Portfolio
Locate
Product family
Spectrumâ„¢ software
Product
Spectrumâ„¢ software > Spatial > Spectrum Spatial
Version
Latest
ft:locale
en-US
Product name
Spectrum Technology Platform
ft:title
Spectrum Spatial Guide
Copyright
2025
First publish date
2007
ft:lastEdition
2025-03-07
ft:lastPublication
2025-03-07T10:28:48.112000

Depending on your organization's requirements, you may need to create your own custom tile caching mechanism. For example, the built-in tile caching mechanism included with the Spectrum Spatial caches tiles on the file system. If instead you want to cache your tiles in a database, you will need to create your own custom tile caching mechanism.

To create your own tile caching mechanism, use the following steps:

  1. Create a Java class that implements the following interface:
    com.mapinfo.midev.service.maptiling.cache.ITileCache
    Note: Your implementing class must contain a default (no arguments) constructor.

    The ITileCache interface class is packaged in this JAR file:

    SpectrumDirectory/server/modules/spatial/lib/midev-service-maptiling-1.3.0.jar

    For information about each of the ITileCache methods you will need to implement, see the ITileCache Javadoc file located here:

    SpectrumDirectory/server/modules/spatial/javadoc

  2. Package your implementing class into a JAR file, and place a copy of the JAR file in this directory:

    SpectrumDirectory/server/modules/spatial/lib

  3. Add the maptiling.tilecache.class key and full qualified class name as its value in the Management Console.
    1. Open the Management Console.
    2. From the Resources menu, select Spatial.
    3. Expand the Java Properties list.
    4. Click the Add Property button , and scroll to the new property entry at the bottom of the list.
    5. In the Name field, type maptiling.tilecache.class and in the Value field type the fully qualified class name.
    6. Scroll to the top of the screen and click Save.
  4. Pull the named configuration file for the Map Tiling Service (MapTilingConfiguration.xml) out of the repository using your preferred WebDAV tool.

    The default location of the MapTilingConfiguration.xml file in the repository is:

    http://server:port/RepositoryService/repository/default/Configuration

  5. Using a text editor, add any initialization settings for the cache to the MapTilingConfiguration.xml named configuration file.

    Each initialization setting is added to a <Property> element that is a child of the <Cache> element in the configuration file. Each <Property> element has a name attribute and a value attribute which holds the name and value of the initialization setting.

  6. Return the named configuration file to the repository using your WebDAV tool.

The Map Tiling Service will now use your custom tile caching mechanism to cache the map tiles.