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

Error: fetchJsonp is not a function #28

Open
diachedelic opened this issue Nov 10, 2017 · 5 comments
Open

Error: fetchJsonp is not a function #28

diachedelic opened this issue Nov 10, 2017 · 5 comments

Comments

@diachedelic
Copy link

I installed the script via Bower, but it looks like fetchJsonp is never defined (these lines are never executed)

leaflet-bing-layer.js?md5=:100 Uncaught TypeError: fetchJsonp is not a function
    at e.initialize (leaflet-bing-layer.js?md5=:100)
    at new e (leaflet.js?md5=:5)
    at Object.createLayer (base-layer-options.js:26)
    at controller.js:73
    at Array.forEach (<anonymous>)
    at Object.bind (controller.js:71)
    at controller.js:43
@diachedelic
Copy link
Author

I'm using RequireJS/AMD

@diachedelic
Copy link
Author

Looks like the issue is that fetch-jsonp is already wrapped in UMD, which breaks when browserify wraps it again:

image

@dunkinnear
Copy link

+1 for this, only happens for me on IE11, not Chrome.

@gmaclennan
Copy link
Member

I don't use RequireJS or AMD so this will need someone else to fix it.

@diachedelic
Copy link
Author

I have fixed it for myself, but I need to build against fetch-jsonp's master (annotated commit: https://github.com/diachedelic/leaflet-bing-layer/commit/d5371eaf648856fce0fbd5f53307c8f6b7e966db)

So it's not the nicest but it works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants