[OpenLayers-Users] Use of MBTIles with openlayers

Greg Allensworth gregor at greeninfo.org
Wed Jan 25 12:06:17 EST 2012


On 1/25/2012 8:58 AM, Robert Buckley wrote:
> So TileStache can serve and render the
 > MBTiles to use with openlayers?

Correct. http://tilestache.org/doc/TileStache.MBTiles.html

It can serve up an existing MBTiles file. But according to the docs, it 
will not save tiles to a MBTiles file -- you need an existing MBTiles 
file, or can use tilestache-seed to create one.


> Would you know if there are possibilities for exporting
> mapcontent from the openlayers mappanel?
> This is one of the reasons i´m looking in this directory as
> I can´t do pdf exports with geowebcache served from geoserver.

This seems independent of your MBTiles question. TileStache and other 
map servers probably won't get involved with loading the content of your 
map and then creating a PDF.

Check out some of the resources here:
    http://trac.osgeo.org/openlayers/wiki/Printing

Our current favorite method is wkhtmltopdf. You basically write a new 
page using JavaScript and OpenLayers as usual, have it set the map's 
zoom and center and basemap -- so that when the page opens it's showing 
exactly the map you want. Dump the HTML to a file, have wkhtmltopdf 
convert the HTML file to a PDF (yes, wkhtmltopdf speaks JavaScript, even 
jQuery, Bing Maps, and OpenLayers). Really slick.

-- 
Greg Allensworth, Web GIS Developer
BS  A+  Network+  Security+  Linux+  Server+
GreenInfo Network - Information and Mapping in the Public Interest
564 Market Street, Suite 510  San Francisco CA 94104
PH: 415-979-0343 x302  FX: 415-979-0371    email: gregor at greeninfo.org
Web: www.GreenInfo.org     www.MapsPortal.org

Subscribe to MapLines, our e-newsletter, at www.GreenInfo.org


More information about the Users mailing list