{"repo":"akhenakh/selfhostmap","free":true,"listed":false,"github":"https://github.com/akhenakh/selfhostmap","clone":"git clone https://github.com/akhenakh/selfhostmap.git","description":"A complete solution to self host maps","language":"HTML","stars":12,"topics":["gis","map","maps","mvt","pmtiles","self-hosted"],"license":"MIT","category":"self-hosted-apps","readme_excerpt":"selfhostmap A complete solution to self host maps using pmtiles. pmtiles can be served directly using HTTP range queries, but requires some additional js. This solution aims at exposing the traditional MVT tiles /z/x/y format leveraging Caddy and a pmtiles plugin. Styles and assets to display a map are embedded using osm-liberty-gl, so you don't have to, but any styles can be loaded. It can serve local pmfiles, over HTTP or s3 storage. Serve your map See below if you don't know how to create your pmtiles files. Parameters - AREA : the name of the pmtiles files, \"canada\", \"planet\"... - BUCKET : the directory bucket where to find the AREA file, \"file:///home/user/GIS\" or \"http://myserver/files\" or \"s3://mybucket\" see remote-urls. - BASE MAP URL : the base url where the map will be available \"http://192.168.1.3:8080\" - CORS ORIGIN : (Optional) Allow Cross-Origin requests. Set to for all, or a specific domain like https://example.com . Using Docker Using Caddy You need to build Caddy with the pmtiles extension: Install Caddy builder https://github.com/caddyserver/xcaddy Execute the resulting caddy binary: BUCKET should point to the directory you saved your pmtiles files. Point your browser to http://localhost:8080 QGIS Works with QGIS: Create a new Vector Tiles Connection: URL: http://192.168.1.3:8080/tiles/planet/{z}/{x}/{y}.mvt Style: http://192.168.1.3:8080/osm-liberty-gl.json Replace the url with your actual server. Then add the layer to your map. Create a map using planetile","default_branch":null,"files":null,"tree":[],"storefront":"/r/akhenakh","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/akhenakh/selfhostmap/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}