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

Uncaught ReferenceError: rbush is not defined #11

Open
jvolker opened this issue Jul 24, 2017 · 1 comment
Open

Uncaught ReferenceError: rbush is not defined #11

jvolker opened this issue Jul 24, 2017 · 1 comment

Comments

@jvolker
Copy link

jvolker commented Jul 24, 2017

I installed the latest version via npm and required via Browserify:

require('leaflet.layergroup.collision')

I got the following error:

Uncaught ReferenceError: rbush is not defined

I could workaround by changing the require part to the following:

global.rbush = require('rbush')
require('leaflet.layergroup.collision')
@sport4minus
Copy link

in the context of an ionic/angular app we had the same error.
it could be solved through calling

import * as rbush from "rbush"; in the first line of Leaflet.LayerGroup.Collision.js

instead of

let rbush = require("rbush");

on @carlletons fork -> https://github.com/carlleton/Leaflet.LayerGroup.Collision

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

2 participants