I am mapping thousands of addresses and I calculate the distance from a selected marker to all the others and then show on a map only those within (say) 300 miles of the selected marker
I use a filter: range < 300 miles, which works because I recompute the range of every marker every time a different marker is selected
However it is very slow
If instead I computed the range of each marker from the north pole I would not have to recompute the range between markers
The filter would be Range (from the north pole) of the selected marker +150 miles or -150 miles
I could perform this calculation in a PHP snippet however I would require the filter to accept the output of a shortcode as the value to select against
Is this possible?
The benefit should be a greatly reduced workload as only those markers in a 300 mile band around the world would need to be touched
Thanks