I'm following this example from the esri-leaflet docs.

I have an ArcGIS Tiled MapService in ESRI:102696. So I'm trying to use Proj4Leaflet to project the service and use it in my application.

I found some proj4defs here and here. They do differ slightly, but neither seems to work.

This is the Map Service I am trying to use.

I put together a JSBIN example with the code below.

  // The two proj4defs I found
  //var crs = new L.Proj.CRS('ESRI:102696', '+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933 +x_0=250000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs', {
  var crs = new L.Proj.CRS('ESRI:102696', '+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.9999333333333333 +x_0=250000 +y_0=0 +datum=NAD83 +units=us-ft +no_defs', {
    transformation: new L.Transformation(1, 17627100, -1, 19798600),
    resolutions: [
  // pass crs into map constructor
  var map = new L.Map('map', {
    crs: crs
  }).setView([38.5432816667, -90.2688116667], 5);  L.esri.tiledMapLayer('http://maps.stlouisco.com/ArcGIS/rest/services/Maps/PublicBase/MapServer', {
    maxZoom: 10,
    minZoom: 0,
    continuousWorld: true

I'm not sure if the transformation is off or what.


There could be something else going on here as well, but its a problem that the service you are attempting to display has 512 pixel tiles (instead of 256).

Proj4Leaflet has a constructor option for L.Proj.CRS.TMS service providers to let you set tileSize explicitly, but not for L.Proj.CRS. Since ArcGIS Server is not a 'TMS' tile server it appears that the irregular size tiles chosen for that service are going to be problematic.


Also, i find it a lot more straightforward to set origin using the values exposed by ArcGIS Server than it is to muck about w/ transformations so i'm going to submit a PR to our repo to update the sample.

//transformation: new L.Transformation(1, 5120900, -1, 9998100),
origin: [-5120900, 9998100],  //same correct output

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.