ThinkGeo.com    |     Documentation    |     Premium Support

Right property to activate cache for GoogleMaps-Layer

We have created our custom GoogleMaps-Layer by inheriting from GoogleMapsLayer-Class. Also we have an custom Overlay inherited from LayerOverlay where we add our custom GoogelMapsLayer to show it on the map.


We now want to use caching to increase the performance.


Do we have to use CacheDirectory property of GoogleMapsLayer-Class or TileCache property of our custom LayerOverlay-Class to activate the caching system?


Also I have seen you have added a new TileMode-property to GoogleMapsLayer-Class. What can I do with it?


Thanks Thomas



Thomas,


I agree with you that it is a bit confusing with multiple tile cache system between GoogleMaps Layer and GoogleMapsOverlay. Hope my following clarifications can give you some hints.


The TileCache system is designed for Overlay instead of Layer, which means the TileCache system just can be used for Overlay. So, now, you can see the TileCache property lies in the Overlay base class. In this way, the GoogleMaps Overlay gets its base class property.


While before public release for the TileCache system in the Overlay, we are trying to develop googleMapsLayer which can be used directly in the Engine instead of Destkop. Basically, the GoolgeMapsLayer is just a layer, so it should not contains any TileCache system. While, it seems that in Web client, the tiles retrieved from Google server will have its own client cache, so we decided to give a special to the GoogleMapsLayer. In this way, we added a property called CacheDirectory to be used to cache in local disk easily, and the GoogleMapsOvelray is just a wrapper for its layer, so it also was added.


Any all, you can use either way of this two ways for caching, I would suggested you use the TileCache system provided in the BaseOverlay ,which seems much more extensible.


Thanks.


Yale