BigMaps with Modest Maps

Following Tom Taylor's suggestion I tried out Modest Maps' ws-compose for generating bigmaps. It's nice and straightforward to use; so far I generated a zoom level 7 image (32768x32768 pixels, 492MB PNG).

Support for Google Maps has recently been removed, which leaves just Yahoo and Microsoft's hybrid aerial maps (I prefer Microsoft's; there's no 'terrain' map from anywhere except Google, it seems).


  1. aptitude install subversion python-imaging php5-cli
  2. svn co http://modestmaps.mapstraction.com/svn/trunk/py/ modestmaps-python
  3. python modestmaps-python/ws-compose.py
<?php
$server = '0.0.0.0'; // server where ws-compose.py is running
$port = 9999; // -p option for ws-compose.py
$provider = 'MICROSOFT_HYBRID'; // http://modestmaps.mapstraction.com/trac/browser/trunk/py/ModestMaps/Providers.py
$zoom = 3; // 1 = smallest image
$size = 256 * pow(2, $zoom);
$params = array(
  'provider' => $provider,
  'method' => 'center',
  'latitude' => 0,
  'longitude' => 0,
  'zoom' => $zoom,
  'height' => $size,
  'width' => $size,
  );
  
$url = "http://{$server}:{$port}?" . http_build_query($params);
system(sprintf('wget %s -O %s', escapeshellarg($url), escapeshellarg("output/{$provider}-{$zoom}.png")));