Giter VIP home page Giter VIP logo

php-mbtiles-server's Introduction

PHP-MBTiles-Server

About

An extremely simple PHP script for extracting images from an MBTiles sqlite database file. Examples for use with Leaflet and OpenLayers included.

Dependencies

Demos

Limitations

This script simply extracts the images from the MBTiles database and DOES NOT support UTFGrid interation!

Beware!

MBTiles files generated from TileMill (currently) use the "TMS" tiling scheme. MapBox hosted tiles (currently) use the "XYZ" tiling scheme. If you use mbutil to export the tile images to a filesystem directory, the default scheme is "XYZ".

php-mbtiles-server's People

Contributors

bmcbride avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-mbtiles-server's Issues

clean URL with .htaccess RewriteEngine

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# db, z x y .png
RewriteRule  tile/(.*)/(.*)/(.*)/(.*)\.jpg$ "mbtiles.php?db=$1&z=$2&x=$3&y=$4" [L]
RewriteRule  tile/(.*)/(.*)/(.*)/(.*)\.png$ "mbtiles.php?db=$1&z=$2&x=$3&y=$4" [L]

directory traversal

I think there is a needs to escape some bad $_GET variables

$zoom = intval($_GET['z']);
$column = intval($_GET['x']);
$row = intval($_GET['y']);
$db = preg_replace("/[^a-z0-9_]/i","",$_GET['db']);

    $conn = new PDO("sqlite:". $db  .".mbtiles");

Tooltips and legend from mbtiles

Greetings,

This is more of a question than an issue.

First, thanks a bunch for your great script. I successfully got my mbtiles working on my server, but can't quite get the tooltips (teaser) and legend that was created in Tilemill to show up on the map. Any tips on pulling that information from the mbtiles?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.