Would a query like
SELECT TOP 1 * ST_DISTANCE etc
or more specifically
SELECT TOP 1 * FROM c WHERE ST_DISTANCE(c.AssetLocation, { 'type': 'Point', 'coordinates': [115.58, 21.84] }) < 49999
return the closest object, and if not, how could I order by distance?
Thanks,
Ian
/*and let it find spatial data automatically { "kind":"Spatial", "dataType":"Point" } - Larry MaccheroneST_DISTANCE(...) < 20. Never tried usingORDER BYandTOPon spatial indexes. - Larry Maccherone