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

Readme.md outdated #19

Open
codepearlex opened this issue Aug 28, 2018 · 3 comments
Open

Readme.md outdated #19

codepearlex opened this issue Aug 28, 2018 · 3 comments

Comments

@codepearlex
Copy link

The Readme.md installation instructions refer to a dist folder (link), which was removed in 8a243f2. I imported the file /src/plugin/leaflet.canvas-markers.js instead and I am getting the following error:

image

After some clicking around, obviously the /src/_full.js or /src/_standalong.js files have to get imported, but I could not yet figure out what rbush is or what the difference between the two is.

Updating the Readme.md would greatly improve getting started with Leaflet.Canvas-Markers.

@mnikolaus
Copy link

These steps worked for me fine:

  1. import leaflet
  2. import rbush (since it is dependency of this plugin)
  3. import /src/plugin/leaflet.canvas-markers.js
  4. initialize factory with window.L.CanvasIconLayer = factory(L);

_full.js and _standalone.js are just doing the steps above(reduce boilerplate a bit)

Hope that helps

@DavidLibeau
Copy link

DavidLibeau commented Sep 8, 2018

Edit :

window.L.CanvasIconLayer = layerFactory(L);

@deeg
Copy link

deeg commented Sep 12, 2018

FYI the dist folder is still there if you get the library through npm

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

4 participants