MapQuest tiles through Leaflet.js

Cross posted from geohackers.in.

Leaflet.js by default supports Cloudmade’s awesome map tiles. The Open MapQuest project also provides beautiful tiles, which are now used at OpenStreetMap.org. To use these tiles all you have to do is to change the map preamble as follows.

The Cloudmade maps layer looks like this.

Change the preamble to.

Rendering Maps: A quick how-to

After a bit of mapping at the Technopark, we planned to render the map offline. This being a step towards the Fort Cochin Heritage Walk Mapping. So, I banged into the #osm channel on irc.oftc.net with the question, the first answer was Mapnik. But Mapnik, essentially, requires you to generate the Postgresql database instance out of the .osm file using osm2pqgsql or osmosis.
But, the quick method is to use Osmarender. The following steps would let you render a good .osm file into a map.

  1. Dowload the xml or .osm data subset of your area of interest.
  2. If you do not have installed subversion system, type sudo apt-get install subversion
  3. Now, you need to get the latest source files of Osmarender, for that type  svn checkout http://svn.openstreetmap.org/applications/rendering/osmarender/
  4. cd to the directory. Probably cd /home/<user_name>/osmarender/
  5. Type  apt-get install xmlstarlet
  6. Now, call the magic!
  7. Type xmlstarlet tr ~/osmarender/xslt/osmarender.xsl  -s osmfile=<file_name>.osm  ~/osmarender/stylesheets/osm-map-features-z17.xml  > <destination_file_name.svg>
  8. You’re done!

Now you should get an svg of the map. I got something like this by tweeking the stylesheets a bit

Map
Map

You can further make additions to the stylesheet files and adjust the parameters to suit your needs. More information is available at the Osmarender wiki.

Reworking NIT-C Maps

The first Mapping Party in Kerala was held at National Institute of Calicut, Calicut, during 23-24 October 2009. The event was organized by the Free Software User Group Calicut and GeoHackers. Indeed the quality was poor. As a result of few discussions on the OSM emailing lists, I have been reworking with the data we collected. Added few new roads, paths etc. Making the map more rich. The map is here.