question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

line weight not working properly if weight is a function

See original GitHub issue

Hi @robertleeplummerjr

I tested the new lines features. While the patch to prevent drawing multiple lines beyond zoom 18 works fine, I run into issues when I try to pass a function to weight.

The following are screenshots made for 2 linesstrings with weights being an Array(4, 10):

  1. with normal leaflet (i.e. L.polyline):

Screenshot from 2020-01-26 10-35-54

  1. with Leaflet.glify (i.e. L.glify.lines):

Screenshot from 2020-01-26 10-36-20

Obviously, the result is not quite correct, which is also reflected by the fact that I see the following warnings in the browser console:

Screenshot from 2020-01-26 10-36-52

So there seems to be an issue in glify.js line 21395:13

The function I am supplying to weight in case of mulitple weights is

function(index, feature) { return weight[index]; };

where weight is the above mentioned array.

Any ideas?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
tim-salabimcommented, Feb 23, 2020

This works beautifully now!

Screenshot from 2020-02-23 11-54-23

3reactions
robertleeplummerjrcommented, Feb 22, 2020

Just pushed fixes. Please try again and let me know, this should be resolved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lineweights do not display on screen in an AutoCAD drawing
Select the object. Enter EXPLODE in the AutoCAD command line. The line weight should be shown correctly. Enter PEDIT in the AutoCAD command...
Read more >
Microsoft Office 2016 Professional Plus - EXCEL - Modify Line ...
Right-click the line you want to widen. · Click the “Outline” button. · Hover your cursor over the “Weight” option. · Select the...
Read more >
Line weights not plotting correctly... - Printing and Plotting Wiki
Line weights not plotting correctly - User says that all line weights on the plot come out at weight 0 even though there...
Read more >
font-weight is not working properly? - Stack Overflow
font-weight can also fail to work if the font you are using does not have those weights in existence – you will often...
Read more >
AUTOCAD Line weight Not Showing When Printing - YouTube
Line Thickness not showing when plotting/ printingSometimes We printing, the line thickness not appearing.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found