-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
The print page does not show the style created with leaflet.pattern.js plugin #98
Comments
Hi Sarah, Please refer to this section on registering unknown layers: new-print-layersrenderers-registration But in general it should look like something like this:
Regards. |
I appreciate the quick response!
I don't receive the error anymore however, now the layer doesn't show up at all. When I console log the 'layer.options' I see the correct style information but I must be missing a step for the layer/data to be added to the print page? I've tried the following variations which showed the same results (no error and no layer). Any guidance would be greatly appreciated! Variation 1.
Variation 2.
Variation 3.
Thank you! |
Hello again, Strange, I would need to take a look/debug it a bit. Would you like to setup a jsbin(or any different) with a simple example so that we can validate any future fix? And I may use it for debugging. Regards, |
Yes, here is a simple example in js bin: https://jsbin.com/qobunom/edit?html,css,js,console,output I have the "L.Control.BrowserPrint.Utils.registerLayer" function commented out because it was giving an error that it was not a function which wasn't happening on my actual project. |
Hello. Okay, I found the problem.
Regards, |
That worked! Thank you very much for taking the time to debug with me. Cheers! |
I have a layer styled with a stripe pattern using the leaflet.pattern.js plugin. When I print that layer it converts the style to leaflet's default blue and I receive the error " Unknown layer, cannot clone this layer. Leaflet version 1.5+HEAD.2e30ff'.
Here is the layer object:
Below is the style function:
I also tried adding the pattern at 'print start' which did not work:
Is there a work around to show the pattern?
The text was updated successfully, but these errors were encountered: