You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The parameters arrive correctly at the mapfish print module.
I configured the Yaml file also using the "keys" section like so:
keys:
!key
host: !dnsMatch
host: maps.google.com
port: 80
domain: !dnsMatch
host: localhost
key: here i wrote my apikey
id: here i wrote my id project in google console
I am working on localhost so I used port 80 for the request.
In the "type" parameter, I tried to use both "google" and "tiledGoogle", without changing the result.
Actual results
I get the following error:
ERROR 2022-11-02 09:49:31.590 MapPrinterServlet.error() - Error while generating PDF
java.lang.NullPointerException
at org.mapfish.print.map.readers.google.GoogleConfig.createUriSigner(GoogleConfig.java:103)
at org.mapfish.print.map.readers.google.GoogleConfig.(GoogleConfig.java:65)
at org.mapfish.print.map.readers.google.GoogleMapReader.(GoogleMapReader.java:60)
at org.mapfish.print.map.readers.google.GoogleMapReader.(GoogleMapReader.java:43)
at org.mapfish.print.map.readers.google.GoogleMapReader$Factory.create(GoogleMapReader.java:48)
at org.mapfish.print.map.readers.MapReaderFactoryFinder.create(MapReaderFactoryFinder.java:36)
at org.mapfish.print.map.MapChunkDrawer.renderImpl(MapChunkDrawer.java:120)
at org.mapfish.print.ChunkDrawer.render(ChunkDrawer.java:55)
at org.mapfish.print.ChunkDrawer.tableLayout(ChunkDrawer.java:49)
at com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:855)
at com.itextpdf.text.pdf.ColumnText.goComposite(ColumnText.java:1978)
at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:999)
at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:993)
at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:981)
at com.itextpdf.text.pdf.PdfPRow.writeCells(PdfPRow.java:583)
at com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:831)
at com.itextpdf.text.pdf.ColumnText.goComposite(ColumnText.java:1978)
at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:999)
at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:993)
at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:981)
at com.itextpdf.text.pdf.PdfPRow.writeCells(PdfPRow.java:583)
at com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:831)
at com.itextpdf.text.pdf.ColumnText.goComposite(ColumnText.java:1978)
at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:999)
at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:993)
at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:981)
at com.itextpdf.text.pdf.PdfPRow.writeCells(PdfPRow.java:583)
at com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:831)
at com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:964)
at com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:910)
at com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:889)
at org.mapfish.print.config.layout.ColumnsBlock$1.render(ColumnsBlock.java:67)
at org.mapfish.print.PDFCustomBlocks.addAbsoluteDrawer(PDFCustomBlocks.java:186)
at org.mapfish.print.config.layout.ColumnsBlock.render(ColumnsBlock.java:56)
at org.mapfish.print.config.layout.Page.render(Page.java:80)
at org.mapfish.print.config.layout.Layout.render(Layout.java:64)
at org.mapfish.print.output.AbstractOutputFormat.doPrint(AbstractOutputFormat.java:31)
at org.mapfish.print.output.PdfOutputFactory.print(PdfOutputFactory.java:58)
at org.mapfish.print.MapPrinter.print(MapPrinter.java:176)
at org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:385)
at org.mapfish.print.servlet.MapPrinterServlet.createPDF(MapPrinterServlet.java:185)
at org.mapfish.print.servlet.MapPrinterServlet.doPost(MapPrinterServlet.java:113)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:696)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:779)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1789)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:750)
Expected results
I should have as a result, the map including the layers and the Google basemap
The text was updated successfully, but these errors were encountered:
Context
Describe the bug
Problems printing with Google basemap using a Google Api Key
How to reproduce
Using the Google section of the following link:
http://www.mapfish.org/doc/print/protocol.html
and the Keys section of the following link:
http://www.mapfish.org/doc/print/configuration.html
I configured the Google request by passing the following parameters from my application to the mapfish print module:
google: {
map: (layer = {}) => ({
"baseURL": "http://maps.google.com/maps/api/staticmap",
"opacity": getOpacity(layer),
"type": "google",
"maptype": "hybrid",
"maxExtent": [-20037508.34,
-20037508.34,
20037508.34,
20037508.34
],
"extension": "png",
"format": layer.format || "image/png",
"sensor": false,
"resolutions": [
156543.03390625,
78271.516953125,
39135.7584765625,
19567.87923828125,
9783.939619140625,
4891.9698095703125,
2445.9849047851562,
1222.9924523925781,
611.4962261962891,
305.74811309814453,
152.87405654907226,
76.43702827453613,
38.218514137268066,
19.109257068634033,
9.554628534317017,
4.777314267158508,
2.388657133579254,
1.194328566789627,
0.5971642833948135
]
})
}
The parameters arrive correctly at the mapfish print module.
I configured the Yaml file also using the "keys" section like so:
keys:
host: !dnsMatch
host: maps.google.com
port: 80
domain: !dnsMatch
host: localhost
key: here i wrote my apikey
id: here i wrote my id project in google console
I am working on localhost so I used port 80 for the request.
In the "type" parameter, I tried to use both "google" and "tiledGoogle", without changing the result.
Actual results
I get the following error:
ERROR 2022-11-02 09:49:31.590 MapPrinterServlet.error() - Error while generating PDF
java.lang.NullPointerException
at org.mapfish.print.map.readers.google.GoogleConfig.createUriSigner(GoogleConfig.java:103)
at org.mapfish.print.map.readers.google.GoogleConfig.(GoogleConfig.java:65)
at org.mapfish.print.map.readers.google.GoogleMapReader.(GoogleMapReader.java:60)
at org.mapfish.print.map.readers.google.GoogleMapReader.(GoogleMapReader.java:43)
at org.mapfish.print.map.readers.google.GoogleMapReader$Factory.create(GoogleMapReader.java:48)
at org.mapfish.print.map.readers.MapReaderFactoryFinder.create(MapReaderFactoryFinder.java:36)
at org.mapfish.print.map.MapChunkDrawer.renderImpl(MapChunkDrawer.java:120)
at org.mapfish.print.ChunkDrawer.render(ChunkDrawer.java:55)
at org.mapfish.print.ChunkDrawer.tableLayout(ChunkDrawer.java:49)
at com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:855)
at com.itextpdf.text.pdf.ColumnText.goComposite(ColumnText.java:1978)
at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:999)
at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:993)
at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:981)
at com.itextpdf.text.pdf.PdfPRow.writeCells(PdfPRow.java:583)
at com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:831)
at com.itextpdf.text.pdf.ColumnText.goComposite(ColumnText.java:1978)
at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:999)
at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:993)
at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:981)
at com.itextpdf.text.pdf.PdfPRow.writeCells(PdfPRow.java:583)
at com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:831)
at com.itextpdf.text.pdf.ColumnText.goComposite(ColumnText.java:1978)
at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:999)
at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:993)
at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:981)
at com.itextpdf.text.pdf.PdfPRow.writeCells(PdfPRow.java:583)
at com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:831)
at com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:964)
at com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:910)
at com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:889)
at org.mapfish.print.config.layout.ColumnsBlock$1.render(ColumnsBlock.java:67)
at org.mapfish.print.PDFCustomBlocks.addAbsoluteDrawer(PDFCustomBlocks.java:186)
at org.mapfish.print.config.layout.ColumnsBlock.render(ColumnsBlock.java:56)
at org.mapfish.print.config.layout.Page.render(Page.java:80)
at org.mapfish.print.config.layout.Layout.render(Layout.java:64)
at org.mapfish.print.output.AbstractOutputFormat.doPrint(AbstractOutputFormat.java:31)
at org.mapfish.print.output.PdfOutputFactory.print(PdfOutputFactory.java:58)
at org.mapfish.print.MapPrinter.print(MapPrinter.java:176)
at org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:385)
at org.mapfish.print.servlet.MapPrinterServlet.createPDF(MapPrinterServlet.java:185)
at org.mapfish.print.servlet.MapPrinterServlet.doPost(MapPrinterServlet.java:113)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:696)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:779)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1789)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:750)
Expected results
I should have as a result, the map including the layers and the Google basemap
The text was updated successfully, but these errors were encountered: