Here is a simple way to create your own map, based on you image ;)
PHP MapTiler class allow to prepare the image with PHP, to use it in the own map. It splits the main image in to the standard tiles.

Download here PHP MapTiler

Example make custom map:

Generate the Tiles:

$map_tiler = new MapTiler('/full/path/to/my-image.jpg', array(
  'tiles_path' => '/full/path/to/where-store-result/'
  'zoom_max' => 3,
try {
} catch (Exception $e) {
  echo $e->getMessage();
  echo $e->getTraceAsString();

Display the result with Leaflet.js:

  <link rel="stylesheet" href="dist/leaflet.css" /> 
  <div id="map" style="width: 700px; height: 500px;"></div>
  <script src="dist/leaflet.js"></script>
  var tiles = L.tileLayer('tiles-path/{z}/{x}/{y}.jpg', {
    minZoom: 0,
    maxZoom: 3,
    tms: true
  var map ='map', {
    center: [0, 0],
    minZoom: 0,
    maxZoom: 3,
    //crs: L.CRS.Simple, //available in dev version

4 Comments to “ PHP MapTiler, Simple Map Tiles Generator ”

  1. Davis says:

    Can we implement maptiler using GD library rather than Imagemagic

  2. Carlos Guerra says:

    I tried but works well with zoom up to 4…I need at least 6 . Can you help me?


    • Fedik says:

      It because your original image smaller than it need for lvl 6.
      You need to set param 'scaling_up' => 6 to force image resize up to 6 lvl

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>