Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

result-items not clickable #11

Open
jo-pol opened this issue Jan 27, 2016 · 8 comments
Open

result-items not clickable #11

jo-pol opened this issue Jan 27, 2016 · 8 comments

Comments

@jo-pol
Copy link
Contributor

jo-pol commented Jan 27, 2016

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/

@naomap
Copy link
Owner

naomap commented Jan 27, 2016

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...

@jo-pol
Copy link
Contributor Author

jo-pol commented Jan 27, 2016

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.

@naomap
Copy link
Owner

naomap commented Jan 28, 2016

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

@jo-pol
Copy link
Contributor Author

jo-pol commented Jan 28, 2016

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 added a commit to lacemap/lacemap.github.io that referenced this issue Jan 28, 2016
dressed up

toggle between clustered an searchable map works around
naomap/leaflet-fusesearch#11
@jo-pol
Copy link
Contributor Author

jo-pol commented Feb 3, 2016

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.

@naomap
Copy link
Owner

naomap commented Feb 3, 2016

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 :-(

@jo-pol
Copy link
Contributor Author

jo-pol commented Feb 10, 2016

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

@eric47905
Copy link

eric47905 commented Aug 15, 2018

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; } });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants