Changes between Version 4 and Version 5 of CodeSamples/Tiles/ServingTilesViaHttp


Ignore:
Timestamp:
05/27/09 04:57:14 (16 years ago)
Author:
gingerbbm
Comment:

Rejigged and added info about the IIS-specific script.

Legend:

Unmodified
Added
Removed
Modified
  • CodeSamples/Tiles/ServingTilesViaHttp

    v4 v5  
    33This page is one of the !MapGuide Community CodeSamples.  Visit the CodeSamples page to view more!
    44
    5 == Serving Mapguide Tiles directly via Apache ==
     5== Serving Mapguide Tiles directly ==
    66
    7 For scalability, it can be useful to get Apache to serve your map tiles directly.
     7For scalability, it can be useful to get your web server to serve your map tiles directly.
    88
    99This allows the map tiles to be proxied and cached, freeing up the Mapguide Server process, which during high load
    10 may have a request queue. The sample configuration also flags the tiles to expire after one day.   
     10may have a request queue.
    1111
    12 The implementation involves exposing a single map's tile cache directory via apache httpd.conf
     12=== Apache ===
     13
     14The implementation involves exposing a single map's tile cache directory via apache httpd.conf. This sample configuration also flags the tiles to expire after one day.   
    1315
    1416{{{
     
    3840Simply add the updated Mapguide.js to the openlayers\lib\OpenLayers\Layer directory and then open the httpCacheDemo.html file to try it out.
    3941
     42== IIS ==
     43The attached file contains getTile.php which is an IIS version of the Apache seedSheboyganTile.php file mentioned above.
    4044
     45Set up IIS as follows:
     46 1. In IIS select the virtual folder containing the tile cache, right-click and select Properties.
     47 1. In the Properties dialog, select the Custom Errors tab.
     48 1. Choose 404 from the list and click Edit.
     49 1. In the Edit Custom Error Properties dialog choose URL for Message Type and enter a relative path to this PHP file, e.g. "/mapguide/blah/getTile.php".
     50 1. Save this file in the relevant location, e.g. "C:\Program Files\MapGuideOpenSource2.0\WebServerExtensions\www\blah\getTile.php".
     51
     52Note:
     53 1. This script does not handle extra parameters, i.e. the "querystring" parameter added under http://trac.openlayers.org/ticket/1622.
     54 1. You must hard-code the tile map repository definition and access credentials inside this file.
     55