The purpose of this example is to introduce how to use draw in vue+openlayer to draw rectangles.
Click to view the content directory list of this column Openlayers example tutorial 100+ directories
Copy the vue+openlayers source code below directly, and the operation can be run in 2 minutes to achieve the effect
Article directory
Sample effect
Configuration method
1) Check the basic settings: https://xiaozhuanlan.com/topic/1378924560
or also check: https://blog.csdn.net/cuclife/article/details/126195754
2) Paste the above source code into src/ In views/Home.vue ,