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

L.esri is undefined while zooming in/out #1191

Closed
danieloliveira117 opened this issue Mar 31, 2020 · 2 comments · Fixed by #1192
Closed

L.esri is undefined while zooming in/out #1191

danieloliveira117 opened this issue Mar 31, 2020 · 2 comments · Fixed by #1192

Comments

@danieloliveira117
Copy link
Contributor

danieloliveira117 commented Mar 31, 2020

I'm using esri-leaflet as an import (webpack) instead extending the global L.

When zooming in or out I'm getting the error:
TypeError: L.esri is undefined

The error is in the following line:

L.esri.request(tilemapUrl, {}, function (err, response) {

It should be able to be fixed simply by importing the request function instead of using the global L.esri.

@jgravois
Copy link
Contributor

great catch. a pull request with a fix would be most welcome.

jwasilgeo added a commit that referenced this issue Apr 1, 2020
Add request as import in `BasemapLayer.js` (#1191)
@gavinr
Copy link
Contributor

gavinr commented Apr 22, 2020

This was released in v2.4.0: https://github.com/Esri/esri-leaflet/releases/tag/v2.4.0

jgravois pushed a commit to jgravois/esri-leaflet that referenced this issue Apr 23, 2022
jgravois pushed a commit to jgravois/esri-leaflet that referenced this issue Apr 23, 2022
Add request as import in `BasemapLayer.js` (Esri#1191)
jgravois pushed a commit to jgravois/esri-leaflet that referenced this issue Apr 23, 2022
jgravois pushed a commit to jgravois/esri-leaflet that referenced this issue Apr 23, 2022
Add request as import in `BasemapLayer.js` (Esri#1191)
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 a pull request may close this issue.

3 participants