本文整理匯總了Python中Path.Path.floorPlans方法的典型用法代碼示例。如果您正苦於以下問題:Python Path.floorPlans方法的具體用法?Python Path.floorPlans怎麽用?Python Path.floorPlans使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Path.Path
的用法示例。
在下文中一共展示了Path.floorPlans方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: getCustomPath
# 需要導入模塊: from Path import Path [as 別名]
# 或者: from Path.Path import floorPlans [as 別名]
def getCustomPath(latitude, longitude, end_place):
startCoord = Coordinate()
startCoord.latitude = latitude
startCoord.longitude = longitude
#Get all coordinate in the database for our end place
end_coordinates = Coordinate.getAllForBuilding(end_place)
if len(end_coordinates) == 0:
raise Exception(end_place + " is not a building in our database")
#Figure out the two closest coordinates
(startCoord, endCoord) = DB.getClosestCoords([startCoord], end_coordinates)
#Find all floor plans for our end place
#floorPlans = []
#floors = Floor.getAllForBuilding(end_place)
#for floor in floors:
# floorPlans.append(floor.floor_map)
#Get building information for our end place
building = Building()
building.loadFromID(end_place)
#Build path object to pass back
path = Path()
path.startCoord = startCoord.__dict__
path.endCoord = endCoord.__dict__
path.floorPlans = building.floorPlans
path.buildingInfo = building.__dict__
return path.__dict__