def getClosestNode(latLng): closest = -1 closest_dist = 99999. for lid in locations.asIds(): dist = greatCircleDistance(latLng,locations.coordsForLocation(lid)) if dist < closest_dist: closest = lid closest_dist = dist return closest
def gcdForLocations(self,lid1,lid2):#distance between two locations return greatCircleDistance(self.coordsForLocation(lid1),self.coordsForLocation(lid2))
def gcdForLocations(self, lid1, lid2): #distance between two locations return greatCircleDistance(self.coordsForLocation(lid1), self.coordsForLocation(lid2))