Introduction to Leaflet

Leaflet was first created by a team led by Vladimir Agafonkin, and now he works at Mapbox. Its personal homepage is as follows:

Looking at the development history of Leaflet, I can't help but feel a lot of emotion. . Since its development in 2011, as a lightweight webgis player, from the browser to the mobile terminal, as a front-end gis display library, Leaflet is pervasive. .

This is related to its positioning. It focuses on drawing without too many complicated functions. Other functions are done through plug-ins. This point coincides with the current front-end technology.

Therefore, leaflet can quickly complete componentization for this reason. Each plugin is a component. . Esri-leaflet is a collection of a series of components.

leaflet-debug版

Leaflet installation:

Using a JavaScript package manager

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

If you use the npm package manager, you can get a local copy of the leaflet by running the following command:

npm install leaflet

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

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

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.

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

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

Guess you like

Origin blog.csdn.net/nmj2008/article/details/115251642