Leaflet.Canvas-Markers icon indicating copy to clipboard operation
Leaflet.Canvas-Markers copied to clipboard

Readme.md outdated

Open codepearlex opened this issue 7 years ago • 3 comments
trafficstars

The Readme.md installation instructions refer to a dist folder (link), which was removed in 8a243f280786a66fed02b3e642036fce6f777942. 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.

codepearlex avatar Aug 28 '18 14:08 codepearlex

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

mnikolaus avatar Aug 29 '18 07:08 mnikolaus

Edit :

window.L.CanvasIconLayer = layerFactory(L);

DavidLibeau avatar Sep 08 '18 17:09 DavidLibeau

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

deeg avatar Sep 12 '18 20:09 deeg