Tag Archive for 'map tiles'

MapCruncher - now works with Multimap

MapCruncher is a free tool to publish your own map tiles in Virtual Earth. This means that you can take an image (for example a campus map), use MapCruncher to georectify it and then generate the required map tiles for different zoom levels.  Although MapCruncher was designed for use with Virtual Earth you can use it just as easily to publish your own map tiles using the Multimap API (because the Multimap API now uses the same projection as Virtual Earth) .

The JavaScript to use tiles generated by MapCruncher in the Multimap API would be something like this:

var l_mapviewer;
//Add the map
l_mapviewer = new MultimapViewer( document.getElementById( 'l_mapviewer' ) );

// 'MMBounds' is placed in square braces because an array is needed to concatenate copyright info correctly:
var l_copyright = new MMCopyright(1,
                               [new MMBounds(new MMLatLon(-90, -180),
                                                 new MMLatLon(90, 180))],
                               0,
                               "©2007 xxxxxxxxxxxx.org");

var l_copyrightCollection = new MMCopyrightCollection('Multimap API - ');
l_copyrightCollection.addCopyright(l_copyright);

var l_tilelayers = [new MMTileLayer(l_copyrightCollection , 14, 18)];
l_tilelayers[0].getTileUrl = l_CustomGetTileUrl;

l_mapviewer.addOverlay( this._tileOverlay );

function l_CustomGetTileUrl(l_a,l_b) {
var l_f = 'http://xxx.yyyyy.com/tile/'+(l_b-1)+'/'+l_a.x+'/'+l_a.y+'.png';
     return l_f;
}

(Contact me if you want more details on this JavaScript).  There should be some Mulitmap SDK examples appearing for this soon - watch this space.

Georeferenced Data

  • If you already have georeferenced data (e.g. in a GIS format) it would be more suitable to use Safe Software’s FME.  The 2008 version of FME can now publish directly to the Virtual Earth tile format (which also works for the Multimap API).  Johannes Kebeck has done an excellent post on this.

Examples

Examples of MapCruncher tiles in Virtual Earth can be seen here.  My favourite example of the use of publishing your own Map Tiles is this lunch:

image

Remember map tiles do not have to be just for maps!