aratcliffe / Leaflet.print

Plugin for printing a Leaflet map using either Mapfish or the GeoServer print module.
114 stars 40 forks source link

Leaflet.print geoserver pdf print plugin(mapfish) #10

Closed haktanaydin closed 10 years ago

haktanaydin commented 10 years ago

We are developing leaflet map printing project. When the map print request is complete, Error message is "spec.layers[0].baseURL has an invalid value: http://a.tile.osm.org/ (spec.layers[0].baseURL has an invalid value ...". It is based on our tile but we are using same tile layer in Leaflet.print demo page somthing like that var tilel= L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { attribution: '© OpenStreetMap contributors' }); map.addLayer(tilel);

When the google tile added and osm tile deleted, There is no base map in generated pdf file.

aratcliffe commented 10 years ago

Sounds like it could be an issue with the configuration of your mapfish server. Is the hostname in the host whitelist? http://www.mapfish.org/doc/print/configuration.html#host-whitelist-definition

haktanaydin commented 10 years ago

In config.yaml file, host list hosts:

But I tried to use google api key like this structure(http://www.mapfish.org/doc/print/configuration.html#host-whitelist-definition) but I got "end of file yaml etc. errors".I know google api key but I have no idea about "id" Where I am wrong ? Can you explain with simple code ?

keys:

aratcliffe commented 10 years ago

Sorry I overlooked your comment about Google tiles. Currently Google layers aren't supported by Leaflet.print. I've updated the plugin README to list the supported layer types. If you modify the plugin code to support Google layers please send me a pull request.