Advertisement

openlayers鼠标经过要素显示高亮

阅读量:

话不多说直接上代码

代码里面有写注释

复制代码
    <!--
     * @description: 在地图的 pointermove 上注册了一个侦听器,以突出显示当前悬停的特征。
    高亮显示鼠标经过的要素。
     * @Author: 
     * @Date: 2022-09-06 14:29:43
     * @LastEditors: 
     * @LastEditTime: 2022-09-06 17:31:45
    -->
    <template>
      <div class="wrapper">
    <div id="map"></div>
    <span ref="status">&nbsp;</span>
      </div>
    </template>
    
    <script>
    import "ol/ol.css";
    import Map from "ol/Map";
    import View from "ol/View";
    import VectorLayer from "ol/layer/Vector";
    import VectorSource from "ol/source/Vector";
    import Style f

全部评论 (0)

还没有任何评论哟~