Closed tomchadwin closed 7 years ago
can you confirm the version you're using? All unit tests are passing and all examples seem okay on 5.0.1:
https://geovation.github.io/labelgun/examples/leaflet/index.html
Mmm, strange. Can you link me the code?
I'll upload a zip. It's got a lot of cruft, as it's generated from QGIS. I don't think the cruft's to blame, though...
Zooming in and then back out again gives me the overlap.
@tomchadwin I examined your code, looks like you're using zoomstart, you want to be using zoomend (as this is the location of the labels at rest). I tried it and it worked as expected :) Also I updated the version to 6.0.0, making some minor changes to the API, the one that would effect you is destroy() becomes reset().
Ah, I see! A daft mistake, with hindsight. I was trying to:
zoomend
free because I already use it for scale-dependent layer visibilityI'll change back to zoomend
. Sorry for the noise.
Just to confirm - all working. It also now works in QtWebkit, so your latest work means it's transpiling perfectly too, as far as I can tell. Thanks so much!
I'm not sure the new algorithm is as successful as the old. I'm getting frequent overlaps:
I would also say that some plausible candidates for labelling have no label: