I woudn't do it in th browser.

Solr itself can give you both the buildings and the distance. 
http://wiki.apache.org/solr/SpatialSearch

Dennis Gearon

Signature Warning
----------------
EARTH has a Right To Life,
  otherwise we all die.

Read 'Hot, Flat, and Crowded'
Laugh at http://www.yert.com/film.php


--- On Sun, 9/19/10, PeterKerk <vettepa...@hotmail.com> wrote:

> From: PeterKerk <vettepa...@hotmail.com>
> Subject: Calculating distances in Solr using longitude latitude
> To: solr-user@lucene.apache.org
> Date: Sunday, September 19, 2010, 8:04 AM
> 
> I want users to be able to filter buildings in my database,
> by enerting a
> random zipcode with a certain distance around it (in
> kilometers). 
> e.g.: 90210 with a radius of 50kilometer.
> 
> The longitude and latitude of a specific building are in
> the database.
> When the user searches on a zipcode, I can get the
> respective longitude and
> latitude from Google Maps.
> 
> Then in Solr I want to return all buildings from my
> database that are in the
> radius of the 50km with the entered zipcode as the
> center...
> 
> I checked this url for calculation, but not sure if there's
> any best
> practice on doing this...
> http://briancray.com/2009/04/01/how-to-calculate-the-distance-between-two-addresses-with-javascript-and-google-maps-api/
> 
> Any examples on how to do this?
> -- 
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Calculating-distances-in-Solr-using-longitude-latitude-tp1524297p1524297.html
> Sent from the Solr - User mailing list archive at
> Nabble.com.
> 

Reply via email to