Code Monkey home page Code Monkey logo

Comments (7)

infostreams avatar infostreams commented on August 19, 2024

I think the ".mbtiles" should not be in the URL.... Also, you should load this via the .tilejson path as indicated in the example. The TileJSON file contains important information about the map and is needed to properly initialize the map viewer. It is a "virtual" file, generated by the tilemap server, so you won't find it in your directory.

As a test, can you see if you can access

http://43.000.00.0/tiles/foo/13/3888/3139.png ?

from mbtiles-php.

 avatar commented on August 19, 2024

Well, I had .htaccess usage disabled on my server! After enabling it, I'm getting blank (grey) tiles:

screen shot 11-19-15 at 12 07 pm

Changing "foo.mbtiles" to "foo.tilejson" gives me a 404 not found

from mbtiles-php.

infostreams avatar infostreams commented on August 19, 2024

Ah! You're getting a valid PNG of the correct dimensions, you mean. Try this:

http://46.101.76.4/tiles/

And then click on http://46.101.76.4/tiles/foo/2/1/1.png for example. I think your tileserver is working :-)

from mbtiles-php.

 avatar commented on August 19, 2024

It is working, that's awesome!!!

Now, what I don't get is how to do that on the script side. Is it the path? Any hints appreciated! :-)

from mbtiles-php.

infostreams avatar infostreams commented on August 19, 2024

Just try to copy-paste the example, and then do something like

  L.mapbox.map('map', 'http://46.101.76.4/tiles/foo.tilejson');

But since this is not an issue with the tileserver itself, I'm closing this...

from mbtiles-php.

 avatar commented on August 19, 2024

Thanks again. The following code seems to work fine with Leaflet:

$(window).load(function() {
var map = L.map('map').setView([74.2343, -54.43534], 14);
L.tileLayer('./tiles/foo/{z}/{x}/{y}.png', {
maxZoom: 18
}).addTo(map);
});

from mbtiles-php.

infostreams avatar infostreams commented on August 19, 2024

Cool, thanks!

from mbtiles-php.

Related Issues (16)

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.