Openlayers combat: drawing graphics, exporting KML files

KML files use XML to express geographic annotations and visualizations by storing locations, image overlays, video links, and modeling information such as lines, shapes, 3D images, and points. In the interaction of OPenlayers, we often need to export some data. In this actual combat, the demonstration is to export KML files.

install dependencies

npm install file-saver --save

renderings

insert image description here

exported file


<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:xsi=

Guess you like

Origin blog.csdn.net/cuclife/article/details/132022984