Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants