Leaflet简介

Leaflet最早是由Vladimir Agafonkin带领一个团队创建的,而现在他在Mapbox任职。其个人主页如下:

看Leaflet的发展历史,不由得感慨良多。。从2011年发展至今,作为一个轻量级webgis选手,从浏览器到移动端,作为一个前端的gis显示库,Leaflet无孔不入。。

这与它的定位有关,它专注于绘图,而没有太多复杂的功能,其他的功能都是通过插件来完成的。这一点跟现在的前端技术不谋而合。

所以,leaflet能够很快地完成组件化就是这个原因。每个plugin就是一个组件。。esri-leaflet就是一系列组件的集合。

leaflet-debug版

Leaflet安装:

Using a JavaScript package manager使用JavaScript包管理器

If you use the npm package manager, you can fetch a local copy of Leaflet by running:

如果您使用npm软件包管理器,则可以通过运行以下命令获取传单的本地副本:

npm install leaflet

You will find a copy of the Leaflet release files in node_modules/leaflet/dist.

您将在node_modules/leaflet/dist中找到Leaflet发布文件的副本。

Leaflet Source Code枫叶源代码

These download packages above only contain the library itself. If you want to download the full source code, including unit tests, files for debugging, build scripts, etc., you can download it from the GitHub repository.

以上这些下载包只包含库本身。如果您想下载完整的源代码,包括单元测试、调试文件、构建脚本等,可以从GitHub存储库下载。

Building Leaflet from the Source

Leaflet build system is powered by the Node.js platform, which installs easily and works well across all major platforms. Here are the steps to set it up:

  1. Download and install Node
  2. Run the following command in the command line:
npm install

Now that you have everything installed, run npm run build inside the Leaflet directory. This will combine and compress the Leaflet source files, saving the build to the dist folder.

https://leafletjs.com/download.html

猜你喜欢

转载自blog.csdn.net/nmj2008/article/details/115251642