September 21, 2011
Maperitive Beta Update

DOWNLOAD LINK: http://maperitive.net/beta/Maperitive-1.1.2001.zip

I’ve just released an update of the Maperitive beta (it’s the same download link and build number).

This update has a few nasty bugs fixed and a couple of new features.

Label Collision Detection

Maperitive now detects if two or more labels overlap. In case of overlaps the label with lower priority is removed. Priority is determined by the order of the features and rules in the rules file - rules near the beginning of the file have a higher priority than the ones near the end.

A sample rendering of UK cities and towns (the first image is from the old Maperitive and the second was generated using the latest beta):

This is a very simple system and it covers only horizontal labels (so street names can still overlap). A better system will be implemented in the future.

TileJSON

generate-tiles command now generates an accompanying TileJSON file. TileJSON is an invention of MapBox developers and it is used to hold some basic information about the generated tiles, like:

  • map name, description and attribution,
  • minimum and maximum zoom,
  • map boundaries.

The benefit of this file is that certain JavaScript mapping libraries (like Wax) can read it and automatically configure themselves based on its data. Compare that to the last step in my web map tutorial where you needed to do it manually.

Here’s a sample TileJSON file generated by Maperitive:

// Generated by Maperitive v1.1.2001
// For more information about TileJSON format, visit https://github.com/mapbox/tilejson#readme
// TODO: Update the 'tiles' to reflect your actual path on the Web server
// TODO: Update the default map location (longitude, latitude, zoom)
{
    "tilejson":"1.0.0", 
    "name":"Maperitive Web Map", 
    "description":"Maperitive Web Map", 
    "attribution":"Map data © OpenStreetMap (and) contributors, CC-BY-SA", 
    "tiles":
    [
            "tiles/{z}/{x}/{y}.png"
    ], 
    "minzoom":9, 
    "maxzoom":13, 
    "bounds":
    [
        -1.2254669867114432, 
        51.041883339771708, 
        1.5044914337393456, 
        52.076449581817052
    ], 
    "center":
    [
        0.13951222351395121, 
        51.55916646079438, 
        9
    ]
}

Note the “TODO”s: make sure you have the proper values before uploading the file to your web server.

UPDATE: there was a bug in the generated TileJSON files, “tiles” is actually an array (thanks to @kkaefer for pointing this out). I’ve updated the beta release.

  1. topinjuryattorney reblogged this from braincrunch
  2. braincrunch posted this