[OpenLayers-Users] Use of MBTIles with openlayers
jrom
jerome.gasperi at gmail.com
Wed Jan 25 09:28:54 EST 2012
Hi Robert,
You can do this through the OpenLayers.Layer.XYZ() class with some
code server side to mimic a standard XYZ grid.
I've done this within the mapshup framework (http://mapshup.info).
Server side, you need to create a script that converts XYZ requests to
mbtiles requests.
See http://code.google.com/p/mapshup/source/browse/server/utilities/mbtsrv.php
for an example of this script.
Suppose that you access this script on http://localhost/mbtsrv.php,
you should set your layer like this client side :
var newLayer = new OpenLayers.Layer.XYZ("mbtile",
'http://localhost/mptsrv.php', {isBaseLayer:true});
Regards
Jerome
--
http://mapshup.info
2012/1/25 Robert Buckley <robertdbuckley at yahoo.com>:
> Hi,
>
> Has anyone successfully used MBTiles to server basemaps in Openlayers?
> Do any live example exist if yes?
>
> yours,
>
> Rob
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
More information about the Users
mailing list