Open lindseydiloreto opened 8 months ago
This has come up a few times, and there's never been a concrete answer...
When the Addresses are stored within a Matrix field, what is the correct way to do a proximity search?
There is a lesser-known query method for craft.matrixBlocks, but it doesn't work with orderBy('distance').
craft.matrixBlocks
orderBy('distance')
✅ {% set matrixBlocks = craft.matrixBlocks.all() %}
❌ {% set matrixBlocks = craft.matrixBlocks.myAddressField(options).orderBy('distance').all() %}
If we can crack it, I'll be happy to document the solution.
This has come up a few times, and there's never been a concrete answer...
When the Addresses are stored within a Matrix field, what is the correct way to do a proximity search?
There is a lesser-known query method for
craft.matrixBlocks
, but it doesn't work withorderBy('distance')
.If we can crack it, I'll be happy to document the solution.