Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

マップの表示 #26

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Conversation

kirikirisu
Copy link
Owner

@kirikirisu kirikirisu commented Dec 16, 2019

概要

  • Issueのタスクを完了させる

対応するIssue

#4

@kirikirisu
Copy link
Owner Author

kirikirisu commented Dec 16, 2019

デバックを行う際はAPI_KEYという環境変数にgoogleのapiキーを設定してください。
apiキーはslackの2019_kanazawa_app_gitにあります。
環境変数の設定の仕方はWikiにあります。

@@ -1,3 +1,4 @@
<resources>
<string name="app_name">kanazawaApp-2019</string>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

キャメルケースになっていないよ。
app_name -> appName
に変更しよう!

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

了解しました

* installed Google Play services and returned to the app.
*/
override fun onMapReady(googleMap: GoogleMap) {
mMap = googleMap
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

なぜmMapという変数名にしたんですか?
個人的にこれだとgMapの方が分かりやすい。

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

デフォルトの変数名をそのまま使いました。
gMapの方が確かに分かりやすいと思ったため次のコミットで変えときます。

@IrukNuj
Copy link
Collaborator

IrukNuj commented Dec 18, 2019

ぱっと見良さそうです。
他の人が見たときのために画面のスクショをPRに貼ってくれると嬉しいかもです
(作業中でその段階じゃなかったらごめんなさい 🙇

-->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="${API_KEY}" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API_KEY管理ちゃんとできてるのgoodです 👍

@kirikirisu
Copy link
Owner Author

image
機能は全て実装できました。

@kirikirisu
Copy link
Owner Author

kirikirisu commented Jan 2, 2020

初回マップ起動時にローケーションのパーミッション確認があります。認証をしてから、現在地ボタンを押して現在地に移動してください。
次からの起動時は、金沢市を中心にマップが起動し、現在地ボタンを押すとエミュレータで設定した現在地に戻ります。

@@ -24,4 +24,4 @@ gradlew
gradlew.bat
local.properties
/build
*.apk
*.apk
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

なんの差分?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

あんまり意味なさげだから,上げない方がいいかも

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

了解しました

@@ -1 +1 @@
/build
/build
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

@@ -14,6 +14,7 @@ android {
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [API_KEY: System.getenv("API_KEY")]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APIKEYを隠すのはGood!!

Comment on lines +95 to +96
if (ContextCompat.checkSelfPermission(this,
android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

上でpermission確認しているのに,ここでもやる意味は?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これがないとなぜかクラッシュしてしまいます

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

なるほど

@shxun6934 shxun6934 added reviewed Return review and removed レビュー依頼 labels Jan 8, 2020
fetchCsv("shisetsu_hinan.csv")

/*パーミッションがあるか確認*/
if(ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED){
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こっちもクラッシュする?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

初回マップ表示時(GPSの使用許可がない状態)で現在地を取得しようとすると、エラーで起動できません。
そのため、どうしてもここで一度確認をしなければなりませんでした。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

この前に現在地取得のメソッド走らせたらどー?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants