BC
-
12/18/2009 5:38:21 AM
RE:Creating custom SQL within Google Maps.
What approach would you recommend if I said I’m querying through a 24,000 address database. My results are pulling back a subset of some 3,000. Then the logic will narrow down to around 500 or so. There are tree variables that are dynamic.
Users starting latitude and longitude List of latitude and longitude from custom table Distance user would like to look out.
My custom table query has the following SQL.
SELECT itemid, Name, Address, City, State, Zip, Latitude, Longitude,
RADIANS(SQRT(power((41.144554 - Latitude),2) + power((-81.894109 - Longitude),2))) * (7912/2) as Miles
FROM customtable_kb_Facilities
where RADIANS(SQRT(power((41.144554 - Latitude),2) + power((-81.894109 - Longitude),2))) * (7912/2) < 50
order by Miles
In the code behind I’m using.
this.GoogleMaps1.WhereCondition = "(Latitude >= 39.144554 and Latitude <= 43.144554) and (Longitude >= -83.894109 and Longitude <= -79.894109)"; this.GoogleMaps1.ReloadData();
My goal is to setup some type of variable such as @Latitude that I can pass value to in the cutom table query. From your answer I’m thinking view_CMS_Tree_joined is the best aproach. Would I have to create a new doucment through the interface for all my 24,000 locations, or can I just insert them?
|