leaflet-fusesearch icon indicating copy to clipboard operation
leaflet-fusesearch copied to clipboard

result-items not clickable

Open jo-pol opened this issue 9 years ago • 8 comments

I went over the code of your example with Nantes again and again but don't see what I'm missing.

The search seems to work fine until I try to click a result item. Debugging with the browser it appears to lack the class clickable.

A pull request on my own project shows what I tried: https://github.com/lacemap/lacemap/pull/1

Live demo without fuse search: http://lacemap.github.io/

jo-pol avatar Jan 27 '16 13:01 jo-pol

First I've clarified where and how should be used the statement : feature.layer = layer; Next your code uses a MarkerCluster, and I'm yet to let the plugin deal with markers in cluster...

naomap avatar Jan 27 '16 13:01 naomap

From your Nantes I example I figured out where you placed feature.layer = layer; as you can see in my pull request it does not make a difference in my situation. https://github.com/lacemap/lacemap/pull/1/files But it is good to have it in your readme for other users.

In the mean time I forked my own project so you can see a live demo of my attempt http://jo-pol.github.io/lacemap/

Does "I'm yet to let the plugin deal with markers in cluster..." mean you are in the process of changing your plugin? That would be very kind.

jo-pol avatar Jan 27 '16 14:01 jo-pol

I wish I had the time to work on it ! Your request is an incentive to find the time though ...

naomap avatar Jan 28 '16 08:01 naomap

As another incentive a simple example for your readme: http://lacemap.github.io/lacemap/searchable.html

Copy it to your own gh-pages branch, then you will have your demo on http://naomap.github.io/leaflet-fusesearch/searchable.html

Strip the popup and you get down at 50 lines, this popup came with the quick start example and I have a use case for it.

jo-pol avatar Jan 28 '16 17:01 jo-pol

I found another plugin that could help to fix this issue: https://github.com/ghybs/Leaflet.MarkerCluster.Freezable

This plugin provides a disAbleClustering and enableClustering. If available these should be called when opening and closing the search popup.

jo-pol avatar Feb 03 '16 17:02 jo-pol

My idea (and I had a prototype working) is to zoom to the level where the cluster is exploded. Seems more useful to me than disabling the cluster. Unlikely to find the time to publish that in the next couple of weeks :-(

naomap avatar Feb 03 '16 18:02 naomap

Your solution sounds much better, I try to be patient.

jo-pol avatar Feb 10 '16 18:02 jo-pol

Yes I know this is 2 years old... That being said jo-pol, do you still have a more simple example of the implementation of this search? I am new to coding and I can get the search to the point of pulling up a list but cannot get it to let me click on one. Having trouble understanding the section L.geoJson(data, { onEachFeature: function (feature, layer) { feature.layer = layer; } });

eric47905 avatar Aug 15 '18 22:08 eric47905