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

Does not work when map renderer is set to SVG? #83

Open
JamesHearts opened this issue Jan 30, 2020 · 3 comments
Open

Does not work when map renderer is set to SVG? #83

JamesHearts opened this issue Jan 30, 2020 · 3 comments

Comments

@JamesHearts
Copy link

image

Seems when the renderer option is set to svg() leaflet-textpath breaks.
Specifically line 78 in leaflet.textpath.js:
var svg = this._map._renderer._container;

This could either be a problem with leaflet not setting ._map._renderer or textpath reading ._container from the wrong field.

@Nttz
Copy link

Nttz commented Feb 9, 2020

We had the same problem. All our polylines were in custom panes, so to solve the problem we added one of the polylines to the deafult leaflet polyline pane.

@mike16889
Copy link

mike16889 commented Sep 14, 2020

@JamesHearts, @Nttz if you replace all occurrences of this._map._renderer._container with this._renderer._container it seems to fix this issue (moving my lines to the default pane was not an option).

Have not done extensive tests but seems to work so far. Only just started testing with this plugin so can't realy test much yet.

EDIT:

also replace all instances of map._renderer with this._renderer

@EliteMasterEric
Copy link

Can confirm this is still an issue for me, and has not been fixed.

Azbesciak added a commit to Azbesciak/leaflet-lasso that referenced this issue Jul 28, 2021
In some cases there can be layers without bounds, for example, empty polylines (in general - paths) made for dynamic changes or workarounds, like makinacorpus/Leaflet.TextPath#83. This fix prevents later exceptions on bounds relation calculation.
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

4 participants