Changes between Version 4 and Version 5 of CodeSamples/Tiles/ServingTilesViaHttp
- Timestamp:
- 05/27/09 04:57:14 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CodeSamples/Tiles/ServingTilesViaHttp
v4 v5 3 3 This page is one of the !MapGuide Community CodeSamples. Visit the CodeSamples page to view more! 4 4 5 == Serving Mapguide Tiles directly via Apache==5 == Serving Mapguide Tiles directly == 6 6 7 For scalability, it can be useful to get Apacheto serve your map tiles directly.7 For scalability, it can be useful to get your web server to serve your map tiles directly. 8 8 9 9 This 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.10 may have a request queue. 11 11 12 The implementation involves exposing a single map's tile cache directory via apache httpd.conf 12 === Apache === 13 14 The 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. 13 15 14 16 {{{ … … 38 40 Simply add the updated Mapguide.js to the openlayers\lib\OpenLayers\Layer directory and then open the httpCacheDemo.html file to try it out. 39 41 42 == IIS == 43 The attached file contains getTile.php which is an IIS version of the Apache seedSheboyganTile.php file mentioned above. 40 44 45 Set 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 52 Note: 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