Skip to content

Instantly share code, notes, and snippets.

@turban
Created September 22, 2012 12:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save turban/3765973 to your computer and use it in GitHub Desktop.
Save turban/3765973 to your computer and use it in GitHub Desktop.
var map = new L.Map('map', {
crs: L.CRS.proj4js('EPSG:3994', '+proj=merc +lon_0=100 +lat_ts=-41 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs', new L.Transformation(1, -4200000, -1, -2000000)),
scale: function(zoom) {
return 1 / (16000 / Math.pow(2, zoom));
},
layers: [
new L.TileLayer('tiles/nz-seafloor/{z}/{x}/{y}.png', {
attribution: 'Data from <a href="http://www.niwa.co.nz/our-science/oceans/bathymetry">NIWA</a> and <a href="http://data.linz.govt.nz/">LINZ</a>',
minZoom: 0,
maxZoom: 6,
continuousWorld: true
})
],
center: new L.LatLng(-37.562, 177.291),
zoom: 3,
continuousWorld: true
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment