title: How to apply specific marker click function in Overlapping Marker Spiderfier for Leaflet?
body: <p>I have a map and some markers on that map. I have used <a href="https://leafletjs.com/" rel="nofollow noreferrer">leaflet js</a>. Sometimes multiple markers are in the same geo location. And for this reason some markers are hidden. So to prevent that I am using <a href="https://www.npmjs.com/package/overlapping-marker-spiderfier-leaflet" rel="nofollow noreferrer">Overlapping Marker Spiderfier for Leaflet</a>. And that hidden issue if fixed.</p>
  <p>I added my start marker to oms as follows,</p>
  <pre><code>oms.addMarker(startMarker);
  </code></pre>
  <p>But actually my markers are connected markers. That means one marker for start location and one marker for stop location. So there are always will be start-strop indicating markers. So there is a function whenever I click the start marker it is going to the stop marker. Since I have to user the overlapping marker spiderfier I had to remove that function.</p>
  <p>Before removing the functions it was like this,</p>
  <pre><code>startMarker = L.marker(latitude, longitude], {
          icon: icon,
        }).addTo(this.map).on(&quot;click&quot;, (event) =&gt; {
          this.map.flyTo(L.latLng([stopLat, stopLong]),
            15);
        });
  </code></pre>
  <p>In oms there is a click event so I added the above code inside the following,</p>
  <pre><code>oms.addListener('click', (marker: any) =&gt; {
  
  });
  </code></pre>
  <p>But it is not working. What it does is when I click any start marker, every start marker is going to the same stop marker. But it should go to their respective stop markers. So what I need to know is how can do that with <code>oms.addListener</code>?</p>