Closed neerajlk closed 4 years ago
Hi,
You should use factory function, or new object for layer registration.
Here is more details.
So basically instead of
return L.StripePattern(layer,utils.cloneOptions(layer.options))
just use factory function or add new in front of object creation.
return L.stripePattern(layer,utils.cloneOptions(layer.options))
or
return new L.StripePattern(layer,utils.cloneOptions(layer.options))
I have this issue in registering a pattern layer in browser-print,I tried adding the below code for registration in the library.
this.registerLayer(L.StripePattern, 'L.StripePattern', function (layer, utils) { return L.StripePattern(layer,utils.cloneOptions(layer.options)) });
However on print preview I am getting this error this.callInitHooks is not a function
the library for L.StripePattern is this leaflet.pattern.
Any help will be highly appreciated.