Igor-Vladyka / leaflet.browser.print

A leaflet plugin which allows users to print the map directly from the browser
https://igor-vladyka.github.io/leaflet.browser.print/
MIT License
154 stars 76 forks source link

Problems registering ESRI leaflet layers. #78

Closed scaddenp closed 4 years ago

scaddenp commented 4 years ago

I am trying to get this to work ESRI leaflet layers. For instance, an imageMapLayer, (ultimately extends imageOverlay), I tried to register with: L.Control.BrowserPrint.Utils.registerLayer( L.esri.ImageMapLayer, "L.esri.ImageMapLayer", function(layer, utils) { return L.esri.ImageMapLayer(layer.options); } ); (tried a few other variants too). Documented here - https://esri.github.io/esri-leaflet/api-reference/layers/image-map-layer.html (other layer types also documented there). When the browser runs, I get: coreapp.js:139 TypeError: this.callInitHooks is not a function at Object.e [as ImageMapLayer] at Object.builder at Object.cloneLayer at mainapp.js at Array.map () at e._setupPrintMap at e._addPrintMapOverlay at e._print at e.print

layer.options seems to have all the correct values set at point when the builder calls it. Any pointers?

Igor-Vladyka commented 4 years ago

Hi,

Please check my answer here. Idea is the same.

Igor-Vladyka commented 4 years ago

77