I plan to do something similar in the very near future, so I have a few suggestions, but no actual code yet. Hope this is helpful.
I expect to store lat / lon for each element in my db (so it is geocoded only once). To select elements at a specific distance from the point, I calculated the lat / lon numbers, which are βxβ miles north / south / east / west from my center point. Then the choice becomes a simple matter of choosing records, where the lat / lon values ββfall between the values ββof my square.
And yes, I know that technically I have to use the circle to accurately control the distance, but it is much easier and faster. If you really need to use the circle for a more precise limit, first use this method, then use more complex calculations to weed out the elements outside the circle in the corners.
I am not familiar with Bing licensing, but if I remember Google correctly, you need to have a paid (commercial) license to store geocoding results. And itβs not cheap. Thus, it can deny any value that my proposal might have: (
Change I just read the question a little more carefully, and I see that we are talking about miles, not linear kilometers. So my answer is not really applicable unless you want to use it as a way to narrow down the number of your driving investigations.
In addition, with regard to geocoding and licenses, you can see geocoder.us , which is pretty cheap.
Ray
source share