What should be the sspn value for 1mile X 1mile square on map for google local search api?
I tried out s开发者_如何学Cspn value to be 0.01,0.01 but not very sure about this.
I need to search from google local search for businesses within 1 mile radius of the current user's position.
The latitude part of the sspn is 0.0145.
The longitude part varies depending on where you are. The closer to the pole you are, the fewer miles there are per degree. If you're on the equator, then it's 0.0145, the same as the latitude, but as you move towards the poles it gets larger in proportion to 1/(cos(latitude))
The equation is 180/(3959*cos(latitude)*pi) per mile.
However, since you only need the sspn values accurate to within a factor of 2, the values 0.015,0.025 would be sufficiently accurate for much of the Earth.
精彩评论