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

originalTilePoint.scaleBy is not a function #96

Open
Brendan92 opened this issue Apr 4, 2017 · 5 comments
Open

originalTilePoint.scaleBy is not a function #96

Brendan92 opened this issue Apr 4, 2017 · 5 comments

Comments

@Brendan92
Copy link

I'm not sure where my problem is, but I keep on getting this error:

TypeError: originalTilePoint.scaleBy is not a function
at http:///leaflet-image/leaflet-image.js:119:18
at Array.forEach (native)
at handleTileLayer (http://
/leaflet-image/leaflet-image.js:111:15)
at start (http:///leaflet-image/leaflet-image.js:335:13)
at poke (http://
/leaflet-image/leaflet-image.js:323:26)
at Queue.defer (http:///leaflet-image/leaflet-image.js:301:7)
at drawTileLayer (http://
/leaflet-image/leaflet-image.js:45:50)
at eachLayer (http:///leaflet/dist/leaflet.js:6:21728)
at leafletImage (http://
/leaflet-image/leaflet-image.js:32:9)

Can someone assist me on what I'm doing wrong or is this a fault with the plugin?

@aanil649
Copy link

aanil649 commented Apr 6, 2017

Encountering same error. Any fix to this problem.

@KimaniKihiu
Copy link

Any solution to this?

@anotheredward
Copy link

Fixed by reverting to v0.3.0 as it doesn't use "scaleBy". Not ideal, but works.

@tombrennan06
Copy link

scaleBy is in Leaflet 1.0, but not 0.7. You're presumably using the older version. You'll need to upgrade, or alternatively edit the current version of leaflet-image to work around. This might work:

var tilePos = originalTilePoint
.multiplyBy(tileSize)
.subtract(bounds.min);

@tombrennan06
Copy link

You can just upgrade to Leaflet 1.0. Or if you can't upgrade, use the code workaround above. It's not an issue with the plugin that needs resolving.

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

No branches or pull requests

5 participants