Open BasmaNabil opened 7 years ago
That's a DNS issue. Your browser isn't resolving "ip" to your server running mapfish print. Is this running locally on your development machine and do you have an appropriate entry in your hostfile?
Yes I am running it locally
Then you either need an entry for the hostname "ip" in your hostfile or access it as localhost.
i changed it to 'url: 'http://localhost:9090/print'' as this is the port for tomcat I got this 2 errors XMLHttpRequest cannot load http://localhost:9090/print/info.json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access. The response had HTTP status code 404. GET http://localhost:9090/print/info.json 404 (Not Found)
This is a CORS issue. You will need to proxy the request to mapfish from your application domain and port.
Hello,
I am new with Mapfish print,i want to to use it with leaflet to print a map,i used the following code var printProvider = L.print.provider({ method: 'GET', url: 'http://ip:8080/print', autoLoad: true, outputFormat: 'pdf', dpi: 90 }); var printControl = L.control.print({ provider: printProvider }); mymap.addControl(printControl);
And i got this error:GET http://ip:8080/print/info.json net::ERR_NAME_NOT_RESOLVED I know he is right but how can i solve it?