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

AlfTheCat’s picture

Same 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?

Summit’s picture

Hi,
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