Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Exploring New Google Places API
Search
KintoTech_Dev
December 05, 2024
270
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Exploring New Google Places API
Mobility Night #1 - GPS・位置情報 -
https://mobility-night.connpass.com/event/334400/
KintoTech_Dev
December 05, 2024
More Decks by KintoTech_Dev
See All by KintoTech_Dev
クルマのサブスクの"出口"で 値付けAIを作る
kintotechdev
1
160
ClaudeCodeでセキュリティ監視業務を半自動化_1年の運用でわかったAIに任せる設計の5つのポイント
kintotechdev
4
1.2k
AI Native Dev 6ヶ月の歩み
kintotechdev
2
140
アラート疲弊からの脱却へーSOC業務における_AI_エージェント活用の実践_v2.pdf
kintotechdev
7
2.2k
人とエージェントが高め合う協業設計
kintotechdev
0
3.3k
AI_Dev_Day_製造業領域でのAI活用から見た活用の罠と成功に導く実践知.pdf
kintotechdev
0
390
RAGの精度向上とエージェント活用
kintotechdev
2
250
MOSKINというTypeScriptプロダクトを新規立ち上げする中で踏んだ地雷
kintotechdev
0
420
KINTO Fukuoka Tech Lounge #1 E2E × AI
kintotechdev
0
120
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
97
6.8k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.6k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Ruling the World: When Life Gets Gamed
codingconduct
0
330
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
WENDY [Excerpt]
tessaabrams
14
39k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
The SEO Collaboration Effect
kristinabergwall1
1
560
Testing 201, or: Great Expectations
jmmastey
46
8.3k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.1k
Transcript
Exploring New Google Places API KINTOテクノロジーズ ⼤沼 2024/12
©KINTO Corporation. All rights reserved. 2 ⾃⼰紹介 @numaMyk 2010年〜Androidエンジニア 2024年5⽉にKINTOテクノロジーズに⼊社しモビリティサービス
my route の Androidアプリ開発に従事。 BLEタグと屋内の位置情報検知機能で⼈やモノの位置管理システムのプロジェクトを経験。 バイクや登⼭で絶景ハントするのが趣味
©KINTO Corporation. All rights reserved. 3 Index ⽬次 1 はじめに
2 3 4 5 料⾦体系の変更 6 まとめ 新しいオートコンプリート 新しいPlace Typesの追加 Google Places APIとは 7 会社紹介
©KINTO Corporation. All rights reserved. 4 はじめに 今回の発表は、Google Map PlatformのPlaces
APIのアップデート情報を調べてみたことをお話しします。 今年の初めにGoogle I/O 2024にてPlaces APIが新しくなったことが公表され、キャッチアップしたいと 考えました。 この発表で話す内容の調査は以下のライブラリを使⽤したandroidアプリで確認しています。 • Places SDK for Android v4.1.0
©KINTO Corporation. All rights reserved. 5 Google Places APIとは Google
Places APIは、Googleの位置情報データベースを活⽤して、特定の場所や周辺エリアの情報を 取得できるAPIです。 • 場所検索: 現在地や特定の条件に基づいて、レストラン、ホテル、観光地などを検索。 • 詳細情報の取得: 営業時間、電話番号、評価、レビューなどの詳細な場所情報を取得。 • オートコンプリート機能: ユーザーが⼊⼒したキーワードに基づいて、候補をリアルタイムで提案。 モビリティサービスにおける ユーザー体験を向上させるために もってこいのツールですね
©KINTO Corporation. All rights reserved. 6 新しいオートコンプリート 3
©KINTO Corporation. All rights reserved. 7 新しいオートコンプリートの特徴:地域に基づいた精度の向上 より最適な場所の候補を表⽰。 指定した位置情報や地域に基づいてより 関連性の⾼い検索結果が得られやすくなりました
例)ユーザーが「カフェ」と⼊⼒した場合、 現在地周辺のカフェを優先して表⽰。
©KINTO Corporation. All rights reserved. 8 新しいオートコンプリートの特徴:多⾔語対応の強化 Place Autocomplete の
languageCode パラメータを使⽤することで⼊⼒する⾔ 語に依存せず検索結果を出すことができます。 IETF BCP-47 ⾔語コード(例: en、ja など)を渡します。
©KINTO Corporation. All rights reserved. 9 PlacesClient.awaitFindAutocompletePredictions() パラメータ⼀覧 パラメータ名 origin
結果を⽣成する際の起点(ユーザーの位置など)を指定します。 query ユーザーが検索しているクエリ⽂字列 例: "Sushi" や "Tokyo Station" countries 結果を特定の国に制限するためのISO 3166-1 Alpha-2コード(例: "JP") ⼀度に複数の国を指定することも可能 locationBias バイアス(優先)位置 特定の地点や地域に基づく結果を優先し、特定の地域外の候補も出す locationRestriction 制限する領域 特定の地域外の候補を除外 typeFilter オートコンプリート結果を特定のプレイスタイプに制限 例: TypeFilter.ESTABLISHMENT, TypeFilter.ADDRESS sessionToken セッションごとの⼀意なトークン。オートコンプリートセッション全体で⼀意のトークンを 使⽤することで、料⾦の効率化と操作のトラッキングが可能。
©KINTO Corporation. All rights reserved. 10 val origin = LatLng(35.6868974,139.7722662)
placesClient.awaitFindAutocompletePredictions { this.origin = origin locationRestriction = CircularBounds.newInstance(origin, 200.0) typesFilter = listOf(PlaceTypes.ESTABLISHMENT) this.query = query countries = listOf("JP") sessionToken = token } コードサンプル
©KINTO Corporation. All rights reserved. 11 4 新しいPlace Typesの追加
©KINTO Corporation. All rights reserved. 12 新しいPlace Typesの追加 次世代オートコンプリートでは、従来のPlace Typesに加え、
さらに多くの場所タイプがサポートされており、より多様な検索が可能に。 例: ただの「カフェ」だけではなく「ドッグカフェ(dog_cafe) 」タイプが加わり⽝の同伴が可能なカ フェというのがわかったり ただの「美術館」だけではなく「⾞椅⼦の⼊り⼝がある美術館(wheelchair_accessible_entrance)」タイ プが加わりバリアフリー対応なのか など、特定の施設をより精度⾼く検索できるようになりました。
©KINTO Corporation. All rights reserved. 13 • 課題例: ユーザーが外出先で適切な飲⾷店をすばやく⾒つけたい。 APIの活⽤:
• Autocomplete: キーワードを⼊⼒すると、近くの候補をすばやく提⽰。 • Place Details: 各店舗の営業時間、レビュー、混雑状況を表⽰。 • Place Types: 「ヴィーガンレストラン」「ハラールレストラン」など 特定条件の絞り込み。 Place Types を駆使することでどのように課題を解決できるか
©KINTO Corporation. All rights reserved. 14 • 課題例: ユーザーが外出先で適切な飲⾷店をすばやく⾒つけたい。 デザイン視点のポイント
• ⼊⼒補助や候補リストを直感的に⾒やすく設計する。 Place Types を駆使することでどのように課題を解決できるか
©KINTO Corporation. All rights reserved. 15 料⾦体系の変更 5
©KINTO Corporation. All rights reserved. 16 料⾦体系の変更 API利⽤ごとの個別課⾦から、セッション単位の料⾦モデルへ刷新されました。 • セッション
= ユーザーの連続的なAPI呼び出しの期間。 • 最⼤ 15 分間継続可能。 旧料⾦モデルの例 • ユーザーが10回リクエスト -> 10回分課⾦。 新料⾦モデルの例 • 同じ10回リクエストでも1セッション内で完結 -> 1セッション分課⾦。
©KINTO Corporation. All rights reserved. 17 料⾦⽐較 以前: 現在 リクエストごとの課⾦
セッションごとに $17.00/1,000セッション 以前 現在 それぞれ別々に課⾦ セッション単位で $23.00/1,000セッション Places API (Autocomplete): Autocomplete + Place Details:
©KINTO Corporation. All rights reserved. 18 placesClient.awaitFindAutocompletePredictions { this.query =
query sessionToken = token } } どのようにコストを削減できるか (従来の例: 必要以上のデータ取得) 問題点: 上記のコードでは、全てのフィールドをデフォルトで リクエストしているため、不要なデータ取得によるコストが発⽣。
©KINTO Corporation. All rights reserved. 19 val placeFields = listOf(Place.Field.ID,
Place.Field.DISPLAY_NAME, Place.Field.RATING) placesClient.awaitFetchPlace( placeId = placeId, placeFields = placeFields sessionToken = token ) どのようにコストを削減できるか (改善例: 必要なデータフィールドだけを指定) コスト削減のポイント:必要最低限の情報(例: 店名、レビュー 評価)だけを取得。
• 新しいオートコンプリートは、ユーザーの検索体験を より便利でスムーズにアプリケーションの利便性をUP • 必要なPlace.Fieldを必ず指定しリクエストすることで、 コスト効率が向上 まとめ
©KINTO Corporation. All rights reserved. 21 KINTOテクノロジーズ株式会社のご紹介 1
©KINTO Corporation. All rights reserved. 22 KINTOテクノロジーズ公式X
Thank you!