Skip to content

Instantly share code, notes, and snippets.

@tmcw
Forked from tristen/snippet.js
Created June 28, 2011 18:59
Show Gist options
  • Save tmcw/1051904 to your computer and use it in GitHub Desktop.
Save tmcw/1051904 to your computer and use it in GitHub Desktop.
var makeMaps = function () {
var mm = com.modestmaps;
m = new mm.Map('map', new com.modestmaps.WaxProvider({
baseUrl: 'http://a.tiles.mapbox.com/mapbox/',
layerName: 'world-glass',
zoomRange: [4, 8]
}));
m.setCenterZoom(
new com.modestmaps.Location(37, -97), 5);
o = new mm.Map('map-overlay', new com.modestmaps.WaxProvider({
baseUrl: 'http://csr.bclcmaps.com/tiles/',
layerName: 'eyJib29sIjp7Im11c3QiOlt7ImZpZWxkIjp7InB1Ymxpc2hlZCI6dHJ1ZX19LHsidGVybSI6eyJjYXRlZ29yeSI6IkVudmlyb25tZW50In19XX19',
zoomRange: [4, 8]
})).zoomer().interaction();
o.setCenterZoom(
new com.modestmaps.Location(37, -97), 5);
o.addCallback("drawn", function(modestmap, e) {
m.setCenterZoom(o.getCenter(), o.getZoom());
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment