Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In the geofield views proximity field if you round the value to 1 or more decimal places and also specify "No results behavior > Count the number 0 as empty" then it doesn't respect / factor in the rounding.
Steps to replicate
- If "round" unchecked & "Count the number 0 as empty" checked & proximity = 0 it works (prints no results text)
- If "round" checked & "Count the number 0 as empty" checked & proximity = 0 it doesn't work (instead of printing the no results text, it outputs 0.00
Comments
Comment #1
AlfTheCat CreditAttribution: AlfTheCat commentedSame issue here.
I'm using a proximity based view with optional visitor location detection. So before a user sets his or her location, all listings show up as being 0.0 km away.
If I uncheck the round option, then lisings, after setting a location show as being 0,56793022km away (for example).
Is there any solution for this?
Comment #2
Summit CreditAttribution: Summit commentedHi,
For me the same problem. Trying this great tutorial: https://www.chenhuijing.com/blog/drupal-101-mapping-with-leaflet-and-ipg...
But all nodes give distance 0.0 km back...
anyone knows what may be is going on?
greetings and thanks in advance!
Martijn