Git Product home page Git Product logo

map-layer-downloader's Introduction

Map Layer Downloader

中文文档

This program is use for download layer pictures from multiple map services, and store files into z/x/y structure, files can be useful for offline maps for leaflet.

downloads directory contains 3 config examples, and Google Map has many types of layers, you can find it on Google.

Download Configuration

Different download configurations should be separate into different JSON files, here is one example shows how to write the configuration.

{
  "url": [
    "http://mt0.google.cn/vt/lyrs=m&x={x}&y={y}&z={z}",
    "http://mt1.google.cn/vt/lyrs=m&x={x}&y={y}&z={z}",
    "http://mt2.google.cn/vt/lyrs=m&x={x}&y={y}&z={z}",
    "http://mt3.google.cn/vt/lyrs=m&x={x}&y={y}&z={z}"
  ],
  "query": {},
  "dir": "E:/map/",
  "downloadStart": 0,
  "downloadEnd": 13
}

url Array, contains one or more download URLs, before you put it in, use {x} {y} {z} to replace the original URL structure.

query Object, additional request parameters, like in MapBox, you should have a access_token parameter.

dir String, download destination.

downloadStartNumber, starting layer.

downloadEndNumber, ending layer.

How to use

Clone this project into your computer or download server

git clone https://github.com/NimitzDEV/map-layer-downloader.git

Install dependencies

npm install or yarn install

Run

node index.js

After this program started, will prompt you a few questions like which map you want to download, how many concurrencies you want and ask you if you want to resume previous download.

map-layer-downloader's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

protonex

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.