Leaflet Basic Introductory Tutorial (1)

Leaflet is a front-end lightweight gis framework, why is it lightweight. Because compared to traditional "huge" GIS frameworks such as openlayers and mapbox, leaflet not only has a small code size, but also has an extremely simple API structure. It is the best framework for beginners in the GIS industry to learn, not one of them.

So without further ado, let's first learn how to use leaflet to build a webgis map. Build a GIS version of hello world!

The first step is to visit the official website to view the tutorial:
https://mp.csdn.net/mp_blog/creation/editor

We have several ways to introduce leaflet. The first is in the form of CDN, which is an online resource library. If you are a student or a beginner, you can use this method for testing and learning.

The second is to download our code base and import it locally, which is suitable for people like me who usually need to write cases for everyone.

If it is really put into use in the project, we can install it through npm for commercial use.

If it is for learning and testing purposes, you can choose download on the official website to directly download the leaflet js file package. After downloading, it will contain two necessary files:

leaflet.css and leaflet.js. We drag these two files into our project together with the images folder (because it contains static resources inside), and we can use it.

 Now let's build a hello world!

 

Guess you like

Origin blog.csdn.net/lz5211314121/article/details/129320141