Openlayers actual combat: move the mouse to the overlapping geometry to get all the features information of multiple layers

In the actual project of Openlayers, it often happens that there are multiple vector layers superimposed in a certain area. At this time, click on the inner point, and we need to obtain the information of all vector layers. If this is done, this example demonstrates the situation where two layers are superimposed and all information is obtained.

renderings

insert image description here

source code

/*
* @Author: 大剑师兰特(xiaozhuanlan),还是大剑师兰特(CSDN)
* @此源代码版权归大剑师兰特所有,可供学习或商业项目中借鉴,未经授权,不得重复地发表到博客、论坛,问答,git等公共空间或网站中。
* @Email: [email protected]
* @First published in CSDN
* @First published time: 2023-08-18
*/

<template>
	<div class="container"&

Guess you like

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