Skip to content

Unknown layer, cannot clone this layer. Leaflet version: 1.9.4 with vue #147

@raquelcampingcare

Description

@raquelcampingcare

Hi!

When I print the map, the image does not appear for printing and I receive the warning "Unknown layer, cannot clone this layer. Leaflet version: " + L.version), console.info("For additional information please refer to documentation on: https://github.com/Igor-Vladyka/leaflet.browser.print.").

onMounted(() => {
mapHeight.value = parseInt(window.innerHeight - 166);

setTimeout(() => {
    if (mapReference.value && mapReference.value.leafletObject) {
        const map = mapReference.value.leafletObject;
        
        L.control.browserPrint({
            title: "Imprimir mapa",
            position: "topright",  
            printDelay: 0,        
            preferCanvas: true,    
            hideControlContainer: false,  
            printLayer: true,      
        }).addTo(map); 
    }
}, 500); 

});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions