Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I could be doing this incorectly but I want to set a static value for lat lon for a proximity field in a my view.
I was hoping to pass in a token for lat, lon.
Is that possible?
Comments
Comment #2
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedIn the proximity filter for views
select static
it would be nice to then be able to enter in two tokens for lat/lon that represent the current location the logged in user is in.
Another option would be select the geocode from exposed fields options.
I could then put in a default token for the current address the person is at
That would cover the options of getting distance from the current logged in user depending
Comment #3
Ruslan PiskarovHello.
For such functionality, I am using the following code.
Comment #4
ChristianAdamski CreditAttribution: ChristianAdamski commentedYou can use the new "Proximity Entity" argument introduced in #2936637: In "Filter Criteria" the "Proximity" filter does not work (v2) now. It allows to calculated the proximity by entity ID relative to any geolocation field in the current install. You can then use the "Current user ID" as fallback value in views then.