zoom level scales or resolutions

1,327 views
Skip to first unread message

Keane, Tim

unread,
May 16, 2012, 1:15:39 PM5/16/12
to leafl...@googlegroups.com

NYC is in the process of creating a publicly available set of detailed Web Mercator tiles and we would like to make them available for use in leaflet.  We have been unable to get our test tiles to work in leaflet as a L.Layer.WMS provided by GeoWebCache.  The OpenLayers map options for this data are as follows:

 

{

     projection : "EPSG:3857",

     resolutions : [ 132.29193125052919,

                92.604351875370426, 67.733468800270941,

                33.866734400135471, 16.933367200067735,

                8.4666836000338677, 4.2333418000169338,

                2.1166709000084669, 1.0583354500042335,

                0.52916772500211673,

                0.26458386250105836 ],

     maxExtent : new OpenLayers.Bounds(

                -8352920.48698, 4887220.912586,

                -8082558.309632, 5067712.988343)

}

 

Is there a simple way to access these tiles through leaflet or a preferred set of scales that will work with the leaflet defaults?

 

Tim Keane

Software Development Manager, City-wide GIS

New York City Department of

Information Technology & Telecommunications

2 Metro Tech Center, 4th Floor

Brooklyn, NY 11201

 

(718) 403-8414

tke...@doitt.nyc.gov

 

gallab

unread,
Aug 23, 2012, 10:19:44 AM8/23/12
to leafl...@googlegroups.com
Hi guys, 

I am also trying to use LeafLet with  a WMS provided by GeoWebCache. Whilst It works fine with OpenLayers API, I'm unable to do it with LeafLet.
Did you by any chance figure out how to configure your layer on LeafLet ? 

Help would be much appreciated If anyone has a clue,

Gallien  

Ermias Beyene Tesfamariam

unread,
Feb 28, 2014, 5:34:46 AM2/28/14
to leafl...@googlegroups.com
Checkout the Proj4leaflet plugin that adds support to projections. https://github.com/kartena/Proj4Leaflet

// curtom projection
var crs = new L.Proj.CRS('EPSG:3575',
        '+proj=laea +lat_0=90 +lon_0=10 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs',
  {
    resolutions: [8192, 4096, 2048], // 3 example zoom level resolutions
  }
);

var map = L.map('map', {
  crs: crs,
  continuousWorld: true
});
L.tileLayer('http://tile.example.com/example/{z}/{x}/{y}.png').addTo(map);
Cheers,
Ermias
Reply all
Reply to author
Forward
0 new messages