Is there a way to let the user switch between miles and kilometers in the exposed proximity filter? This issue implies that was available in D7 but I can't see any way to do it in D9.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | Screenshot 2023-01-07 at 18.03.32.jpg | 437.69 KB | itamair |
| #11 | Screenshot 2023-01-07 at 18.02.48.jpg | 141.8 KB | itamair |
| #7 | geofield_proximity_units_selections_3327487_7.patch | 9.47 KB | itamair |
Comments
Comment #2
itamair commentedNice catch @Michelle ... actually this proximity filters implementation doesn't make the Units form element exposed ... in the View Exposed Proximity Filters. It could be indeed a valid add-on ... but that needs work.
I can put on my TODO list, but cannot put on top of it.
I don't feel should be a big deal ...
Feel welcome in providing a working (and well QAed) patch eventually on it ...
Comment #3
michelleThanks. Going to see what we can do for the client to work around this. If we end up with something that could be useful to others, I'll add it here.
Comment #4
michelleWe ended up working around it by adding the proximity filter twice, once set to miles and one set to kilometers. The second one didn't have the form and the form from the first one luckily worked with both. I then form altered a drop down to switch and a coworker added in javascript to show/hide the distance boxes to toggle between them. It works but isn't anything that makes sense to put in the module itself. Having the exposed filter handle it would be the best way to go in the module.
Comment #5
michelleComment #6
itamair commentedComment #7
itamair commented#Michelle thanks ...
I found both time and commitment to implement this Feature request, with the attached patch.
I am committing it into dev and going to deploy a brand new 8.x-1.49 release with it ...
Please Test and Review it, and let me know if you find any regression/bug in it ... and eventually re-open this.
Comment #9
itamair commentedComment #11
itamair commentedNow a new checkbox is present that lets you expose the Units selector in the View Exposed Filter form, as you can see from the attached screenshots.
The Geofield Live Demo home page/map is already working with this setting: https://www.geodemocracy.com/drupal_geofield_stack_demo/web
Comment #12
michelle@itamair - Great! Thank you!