Home (More maps) ::: Send me a message
Select 'circle' or 'rectangle'.
Click and drag on the map to define a polygon.

Reset    Rectangle    Circle    Accept
For a radius search use it like this:
-----------------------------------------------
select *,
	acos(cos(centerLat * (PI()/180)) *
	 cos(centerLon * (PI()/180)) *
	 cos(lat * (PI()/180)) *
	 cos(lon * (PI()/180))
	 +
	 cos(centerLat * (PI()/180)) *
	 sin(centerLon * (PI()/180)) *
	 cos(lat * (PI()/180)) *
	 sin(lon * (PI()/180))
	 +
	 sin(centerLat * (PI()/180)) *
	 sin(lat * (PI()/180))
	) * 3959 as Dist
from TABLE_NAME
having Dist < radius
order by Dist
-----------------------------------------------
3959 is the Earth radius in Miles. Replace this value with
radius in KM, or any unit, to get results on the same unit.
centerLat and centerLon are the center of the search (your
input), while lat and lon are fields in the table.

*******************************************

For a rectangular search use it like this:
-----------------------------------------------
select * from TABLE_NAME 
where lat >= lat1 
and lat <= lat2 
and lon >= lon1 
and lon <= lon2
-----------------------------------------------
lat1, lon1, lat2 and lon2 are your input.
lat and lon are fields in the table.