[OpenLayers-Users] Accessing an Offline Tile Store

Chris W chrisw.osgeo at psychogeeks.com
Thu Jul 19 22:06:07 PDT 2012


Hello All,

I've been looking at the possibility of providing an offline map in a Qt
application.  The QtWebKit component would be used to host an OpenLayers
page inside the application.  As a first cut I have implemented a basic
local web server to provide XYZ tile service to an OL layer from local
mbtiles databases.  This all works, and is more disk-space and
distribution friendly than using raw tiles on the disk.  It has the
disadvantage that the desktop app requires a port (multiple ports on
terminal server machines) and exposes the tile service to external
access (localhost anyway)

I had thought of alternate approach that could eliminate the web
server.  QtWebKit offers a C++ to Javascript bridge that allows js to
make calls to C++ functions and vice versa.  If the transport for tile
requests could be replaced with js calls into the C++ the tile service
code could be subsumed into the C++ widget code and no longer be exposed
to the outside world.   Inspection of the inheritance hierarch of the
XYZ layer would seem to indicate an intimate relationship to HTTP... but
I am a bit of a js neophyte.

I wonder if the replacement of the OL transport layer for base layer
tiles retrieval is even possible?  Has something like this been done?

Regards,
Chris



More information about the Users mailing list