Yukaii / zuzugo-legacy

租租狗,通通給我租起來!
0 stars 0 forks source link

Google Maps API 測試 #8

Open Yukaii opened 5 years ago

Yukaii commented 5 years ago

直接列出想找的地理資訊

然後用 Maps API 看怎麼拿到這些資料

Yukaii commented 5 years ago

集中在花費時間

interface SpentTime {
  vehicleTime: number;
  commutingTime: number;  
}

interface LongitudeLatitude {
  longitude: number;
  latitude: number;
}

interface LongLat {
  lng: number,
  lat: number
}

interface NearestOne {
  location: LongitudeLatitude | LongLat | [number, number]
  spentTime: SpentTime
}

interface Chishiki {
  workplace?: SpentTime;
  school?: SpentTime
  convenienceStore?: NearestOne; // nearest one
  market?: NearestOne // nearest one
  gym?: NearestOne
  customPlaces?: Array<{
    name: string
    spentTime: SpentTime
  }>
}