PHPGeoTiles (both for Local Storage and Google App Engine - GAE)

What is PHPGeoTiles?

Web maps are kind of images and creating images are always a bottleneck for the computers. Web mapping clients, such as Google Maps, MS Virtual Earth, Google Earth and OpenLayers, are consuming WMS (Web Map Service) data for every user. The same image can be produced for every request, which is quite unnecessary. Caches can be called proxies between map clients and WMS servers to cache tiles not to reproduce every image again and again.

PHPGeoTiles is another caching tool for web mapping applications written in PHP under BSD License. There are other caching tools such as TileCache (python) and GeoWebCache (java) if you prefer other languages.

PHPGeoTiles is storing map tiles on your disk or Google App Engine's database, "BigTable". The difference of PHPGeoTiles is using Google App Engine to store tiles addition to disk storage, thus there is also a small portion of python codes to store tiles on BigTable addition to PHP codes.

Special Thanks : Authors of "Beginning Google Maps Applications" Books for the "GoogleMapUtility" class.

Requirements :

  • PHP (4 or 5)
  • WMS Server accessible from the Internet
  • Google App Engine Account (if GAE will be used)
  • Installation for Disk Storage :

  • Modify config.php file according to your needs. ($cacheStorage = 0 for Disk Storage)
  • Upload all the PHP files to your hosting.
  • Change the Google Maps API Key in test.php.
  • Run test.php on your browser to see PHPGeoTiles in action.
  • Installation for Google App Engine :

  • Get an Google App Engine account and create an application.
  • Download Python 2.5 or above and install it.
  • Download the Google App Engine SDK and install it.
  • Copy PHPGeoTiles files into a directory (ex: cacheEngine)
  • Change "application: gae_application_id" line accourding to your application ID in "app.yaml" file.
  • Run "appcfg.py update cacheEngine/" from your command line.
  • Modify config.php file according to your needs. ($cacheStorage = 1 for Google App Engine)
  • Do not forget to change "$applicationName" according to your application ID in config.php
  • Upload all the PHP files to your hosting.
  • Change the Google Maps API Key in test.php.
  • Run test.php on your browser to see PHPGeoTiles in action.
  • Installation for ArcGIS Server REST API to Google App Engine :

  • Get an Google App Engine account and create an application.
  • Download Python 2.5 or above and install it.
  • Download the Google App Engine SDK and install it.
  • Copy PHPGeoTiles files into a directory (ex: cacheEngine)
  • Change "application: gae_application_id" line accourding to your application ID in "app.yaml" file.
  • Run "appcfg.py update cacheEngine/" from your command line.
  • Modify config.php file according to your needs. ($cacheStorage = 2 for ArcGIS S. to Google App Engine)
  • Do not forget to change "$applicationName" according to your application ID in config.php
  • Upload all the PHP files to your hosting.
  • Change the Google Maps API Key in test.php.
  • Run test.php on your browser to see PHPGeoTiles in action.
  • Usage of PHPGeoTiles :

    In Web Mapping Clients, PHPGeoTiles can be used in Javascript as seen below :
    --> var tileURL = "geocache.php?x="+tile.x+"&y="+tile.y+"&z="+zoom;

    Download PHPGeoTiles :

    Version 0.2: phpGeoTiles_0.2.zip

    Contact :

    Send e-mail to : alper__at__mekansal_dot_com

    Version History :

    0.2 : Minor Update for ArcGIS Server REST API to Google App Engine Support
    0.1 : Base (WMS to local disk and Google App Engine)