Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dont remap custom web mercator LODs #1039

Merged
merged 1 commit into from
Jan 4, 2018
Merged

Conversation

jgravois
Copy link
Contributor

@jgravois jgravois commented Jan 4, 2018

STR:
right now we are inappropriately blowing away custom LODs when we encounter a wkid:3857 tile cache with a modified origin.

var crs = new L.Proj.CRS("EPSG:3857","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs", {
  origin: [-20037700, 30241100], // custom 
  resolutions: [
    611.4962262813797, // only a subset
    305.74811314055756,
    152.87405657041106,
    76.43702828507324,
    38.21851414253662 
  ]
});

var map = L.map('map', {
  crs: crs
}).setView([32.2217, -110.926], 2);

// The min/maxZoom values provided should match the actual cache thats been published. This information can be retrieved from the service endpoint directly.
L.esri.tiledMapLayer({
  url: 'https://maps2.tucsonaz.gov/arcgis/rest/services/BaseMaps/gisBaseMap_Topo/MapServer',
  useCors: false
}).addTo(map);

the service above probably should have been published using a custom projection (or better yet, the default), but we still can and should correct the logic in our conditional block so that we don't massage LODs when they are passed through in code.

ref: https://community.esri.com/message/739516-leaflet-basemap-issue

@jgravois jgravois merged commit a86e848 into Esri:master Jan 4, 2018
@jgravois jgravois deleted the custom_3857 branch January 4, 2018 19:44
jgravois added a commit to jgravois/esri-leaflet that referenced this pull request Apr 23, 2022
dont remap custom web mercator LODs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant