Giter VIP home page Giter VIP logo

Comments (3)

Istador avatar Istador commented on May 21, 2024 1

z, y, z is not meant to be manually replaced, but automatically by leaflet (https://leafletjs.com/ - a javascript library loaded within the leaflet-demo.html file). The whole world in one image would be: http://localhost:80/tile/0/0/0.png (zoom level 0).

The leaflet-demo.html file is not inserted into the docker image, so the apache webserver inside the docker container listening at port 80 does not serve the file. It is meant as an example that you can open with your browser on the host machine directly as a file (Right Click > Open with > Firefox/Chrome/...).

The example file can be modified to work with other servers too. For example: if you replace http://localhost:80/tile/{z}/{x}/{y}.png with https://c.tile.openstreetmap.org/{z}/{x}/{y}.png it loads tiles from the OpenStreetMap-Server instead of your local one (don't do that in a productive environment).

from openstreetmap-tile-server.

cnaslain avatar cnaslain commented on May 21, 2024
  • Get the IP of your running container by running this command (in my case; the IP is 172.17.0.2):
    docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps | grep overv/openstreetmap-tile-server | awk '{print $1}')
  • Modify the leaflet-demo.html (from your git clone location) page with this IP adress:
    L.tileLayer('http://172.17.0.2/tile/{z}/{x}/{y}.png', {
  • Open in your browser your local leaflet page
  • That's it!

from openstreetmap-tile-server.

Overv avatar Overv commented on May 21, 2024

This has now been clarified in the README.

from openstreetmap-tile-server.

Related Issues (20)

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.