Virtual Earth Tile Server Updates…

Posted by Dave Bouwman | Posted in ArcDeveloper, Virtual Earth | Posted on 25-03-2008

0

Just a quick note about some updates to the Virtual Earth Tile Server code base. You can grab the latest code from the Subversion repository (http://svn2.assembla.com/svn/arcdeveloper/tileserver).

Note: This update will require some configuration changes, but I think they are well worth it.

 

WMS Support

The Tile Server now as a WMS Tile Provider. This allows you to very easily add WMS Services into your Virtual Earth applications. This is a pretty base implementation, but it works smoothly. You just need to specify the base Url (which should include the LAYERS you want in the map images) and the version of WMS to use. The WMSTileProvider takes care of the rest. I’ve only tested with WMS 1.1.1 at this point, but I’ll be working with all flavors shortly so should there be any issues, I’ll be fixing the code.

<!– WMS Service –>

<component id=WMSBathymetry service= type=>

  <parameters>       

    <wmsBaseUrl>http://www.mapsherpa.com/cgi-bin/wms_iodra?LAYERS=Bathymetry</wmsBaseUrl>

     <wmsVersion>1.1.1</wmsVersion>

  </parameters>

</component>

This is the configuration file in source control, and it is pulling a global bathymetry layer from mapsherpa.com. It can be a little slow at the top levels, but once it’s cached, it rips.

Improved Caching Options

Caching is great, and can improve performance, but it can also eat up a lot of disk space. For example, at level 15, there are more than 1 billion tiles, so you could really fill up some disk space. Unless your data only covers a small area, the likelihood of a cache hit at the higher levels is pretty low. Thus you are storing lots of tiles which are not really helping performance. To help manage this, I’ve added a MaxCacheLevel property to the Tile Service. By default it will cache everything, but you can change that by just adding maxCacheLevel into the parameter list in the service configuration…

<!–Bathymetry Service–>

<component id=WMSBathymetryService service=type=>

   <parameters>

     <servicename>wmsbathymetry</servicename>

     <tileProvider>${WMSBathymetry}</tileProvider>

     <storageProvider>${FileStorageProvider}</storageProvider>

     <maxCacheLevel>10</maxCacheLevel>

   </parameters>

</component>

 

FileStorageProvider Changes

The tiles are now stored in sub-folders with the name of the service. So – instead of seeing something like:

c:\tiles\l1\

you will see

c:\tiles\someservice\l1

This allows you to  use the same FileStorageProvider across multiple services in your configuration. Not a big deal, but saves some configuration.

Comments are closed.