Logic for Nearby places with post and categories

Could try a plugin called Geo mash up which turns WordPress into a GeoCMS, has nearby functionality built into it and can take long and lang values or addresses from custom fields. http://wordpress.org/extend/plugins/geo-mashup/ and try https://code.google.com/p/wordpress-geo-mashup/wiki/TagReference for the references.