コード例 #1
0
 /**
  * handle location message
  */
 private function handleLocation($update)
 {
     $location = $update->getMessage()->getLocation();
     $lat = $location->getLatitude();
     $lng = $location->getLongitude();
     $stops = Stop::getNearest($lat, $lng);
     $chatId = $update->getMessage()->getChat()->getId();
     $this->telegramClient->sendMessage($chatId, 'Fermate nelle vicinanze:', false, null, $this->telegramClient->replyKeyboardMarkup($stops, true, true));
 }