maptile

module
v0.0.0-...-2686f8f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2024 License: MIT

README

WARNING

Make sure that you agree and stick to the policies of the tile-providers before downloading!

Tile usage policy if you use OpenStreetMap tiles!

Tile usage policy if you use Google tiles!

Tile usage policy if you use ArcGIS tiles!


logo

maptile

build Go Report Card Coverage Status


Environment variables
Name Description Optional Default
LOG
LOG_SAVE enable logs save Optional false
LOG_PATH logs path Optional ./data/logs/log.jsonl
LOG_MAX_BACKUPS max backups count Optional 3
LOG_MAX_SIZE max logs size in megabytes Optional 1
LOG_MAX_AGE max logs age Optional 7
CACHE
CACHE_ENABLE enable tile cache Optional false
CACHE_PATH a path for cache directory Optional ./data/cache
CACHE_ALIVE cache alive in minutes Optional 14400
OTHERS
SCHEMA providers specs Required NO_DEFAULT
API_PORT api port Optional 8080
SWAGGER swagger docs Optional false
MAX_SIDE max square side Optional 10

All environment variables are available in source code


Providers

Example providers.json contains 3 providers. (but you can set up any providers as you wish. also service support loading .json from local FS)

  • OpenStreetMap
  • Google Maps (Satellite)
  • ArcGIS (Satellite)

Don't forget about providers ToS

Docker Deploy

You can easly deploy it via docker. Basic docker-compose.yml may look like this:

version: '3.7'

services:

  maptile:
    image: ghcr.io/superboomer/maptile:latest
    container_name: maptile
    restart: unless-stopped
    environment:
      - SCHEMA=https://raw.githubusercontent.com/superboomer/maptile/master/example/providers.json
    ports:
      - "8080:8080"

Full example here


Use

If you need to download a big amount of tiles, you can use maptiled

Directories

Path Synopsis
app
docs
Package docs Code generated by swaggo/swag.
Package docs Code generated by swaggo/swag.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL