Skip to content

Mouseover with LCircleMarker #358

Closed
Closed
@alc32

Description

@alc32

Description

I draw a map with circle markers, which radius is a magnitude.

This worked in v1.2.3 but with v2.0.2 does not work.

v1.2.3:
When mouseover the municipality, cursor changes to hand pointer cursor and it is showed the value.
Working example

v2.0.2:
When mouseover the municipality, nothing happens. If i remove l-circle-marker, mouseover function works.

<l-map
    :zoom="zoom"
    :center="center"
    v-bind:style="{ 'height': height, 'width': '100%'}"
    :options="mapOptions"
  >
    <l-geo-json
      :geojson="geojson"
      :options="geojsonOptions"
    />
    <div
      v-for="(feature, index) in geojson.features"
      :key="'circle' + feature.properties.COD_INE">
      <l-circle-marker
        :lat-lng="getLatLong(feature.properties.CENTER_LAT, feature.properties.CENTER_LONG)"
        :interactive="false"
        :radius="radius[index]">
      </l-circle-marker>
    </div>
</l-map>

....

geojsonOptions: {
        onEachFeature: (feature, layer) => {
          layer.on({
            mouseover: mouseover.bind(this),
            mouseout: mouseout.bind(this),
            click: clickFeature.bind(this)
          })
        }
      }

Steps to Reproduce

Expected Results

Actual Results

Browsers Affected

  • Chrome
  • Firefox
  • Edge
  • Safari 9
  • Safari 8
  • IE 11

Versions

  • Leaflet: v1.4.0
  • Vue: v2.6.8
  • Vue2Leaflet: v2.0.2

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions