Giter VIP home page Giter VIP logo

grap-map-tiles's Introduction

node 爬取瓦片制作自己的地图服务

由于很多时候需要在封闭的环境下使用地图底图, 写了一个爬取在线地图瓦片作为静态地图服务器的简单程序, js 代码 180 行, html 不到 10行, 废话不多说直接 github源码

展示

image

使用方法

  npm install
  node app.js || npm run dev
  • 在本地浏览器中打开 client/index.html

  • 在浏览器中滚动鼠标

爬虫

app.js

  • 服务器接收瓦片请求并判断是否存在该瓦片。

  • 存在瓦片则返回瓦片, 不存在则加入缓存等待下载。

downloadMap.js

  • 缓存链接到数组内。

  • 服务端会每隔1秒检查数组内是否有链接 有则去下载。

地图相关

  • Arcgis 官方使用插件 dojo.js 来接入地图底图。

  • dojo.js 除了展示底图几乎一无是处, dojo.js 和 require.js 有冲突。

  • Arcgis 工具分为制作底图的客户端 ArcMap, 服务器 Arcgis Server。

  • leaflet 有相当多的接口和插件来制作地图工具。

  • ArcMap 在发布服务时一定要设置好参数, 不然 leaflet 不能接入底图。

grap-map-tiles's People

Contributors

buildlove avatar

Watchers

 avatar

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.