ownCloud plugin for preview mbtiles files on map

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

ownCloud plugin for preview mbtiles files on map

spatialhast
Hi all,

I'am new in ownCloud, I successfully installed and configured ownCloud 9.0 (Ubuntu 14.04, Apache2, MySQL) and I want create plugin enables ownCloud to show map tiles from mbtiles files directly in the browser, using LeafletJS map library and php-mbtiles server.
Initially I use simple tile cache (stored in ownCloud) and display them on the map using code:

    var downloadUrl = OC.generateUrl('/apps/files/ajax/download.php') + '?dir=',
        dirUrl = '/geography/',
        cacheUrl = '{z}/{x}&files={y}.png',
        tileCacheUrl = downloadUrl + dirUrl + cacheUrl;

    L.tileLayer( tileCacheUrl, {
        zIndex: 10
    }).addTo(map);

But using of tile cache in ownCloud have one big problem - many files and folders that it takes a lot of time when copying or synchronization. There is exist special data format for store tile cache - mbtiles (http://wiki.openstreetmap.org/wiki/MBTiles). Example of web app with Leaflet map and php-mbtiles-server - https://github.com/spatialhast/php_mbtiles_server (include example mbtiles data). I created template of ownCloud plugin - https://github.com/spatialhast/mbtilesviewer, but have problem with integration of php_mbtiles_server (https://github.com/bmcbride/PHP-MBTiles-Server). Please help integrate PHP-MBTiles-Server into ownCloud plugin.

Thanks!