我是LeafletJS的新手。 我正在尝试在LeafletJS中打印地图。 我的打印代码如下:
printProvider = L.print.provider({
capabilities: printConfig,
method: 'GET',
dpi: 254,
autoLoad: true,
// outputFormat: 'pdf',
customParams: {
mapTitle: 'Print Test',
comment: 'Testing Leaflet printing'
}
});
// Create a print control with the configured provider and add to the map
printControl = L.control.print({
provider: printProvider
});
map.addControl(printControl);
但是当我点击打印按钮时,会出现如下错误。
Proxy Error.
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /mapfish-print/pdf/print.pdf.
Reason: Error reading from remote server
有人能帮助我吗?