-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: master
Are you sure you want to change the base?
マップの表示 #26
Conversation
デバックを行う際はAPI_KEYという環境変数にgoogleのapiキーを設定してください。 |
app/src/main/res/values/strings.xml
Outdated
@@ -1,3 +1,4 @@ | |||
<resources> | |||
<string name="app_name">kanazawaApp-2019</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
キャメルケースになっていないよ。
app_name -> appName
に変更しよう!
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
なぜmMapという変数名にしたんですか?
個人的にこれだとgMapの方が分かりやすい。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
デフォルトの変数名をそのまま使いました。
gMapの方が確かに分かりやすいと思ったため次のコミットで変えときます。
ぱっと見良さそうです。 |
--> | ||
<meta-data | ||
android:name="com.google.android.geo.API_KEY" | ||
android:value="${API_KEY}" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API_KEY管理ちゃんとできてるのgoodです 👍
… into createScreen-shelter-kirisawa
初回マップ起動時にローケーションのパーミッション確認があります。認証をしてから、現在地ボタンを押して現在地に移動してください。 |
@@ -24,4 +24,4 @@ gradlew | |||
gradlew.bat | |||
local.properties | |||
/build | |||
*.apk | |||
*.apk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
なんの差分?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
あんまり意味なさげだから,上げない方がいいかも
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
了解しました
@@ -1 +1 @@ | |||
/build | |||
/build |
There was a problem hiding this comment.
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")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
APIKEYを隠すのはGood!!
if (ContextCompat.checkSelfPermission(this, | ||
android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
上でpermission確認しているのに,ここでもやる意味は?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これがないとなぜかクラッシュしてしまいます
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
なるほど
fetchCsv("shisetsu_hinan.csv") | ||
|
||
/*パーミッションがあるか確認*/ | ||
if(ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
こっちもクラッシュする?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
初回マップ表示時(GPSの使用許可がない状態)で現在地を取得しようとすると、エラーで起動できません。
そのため、どうしてもここで一度確認をしなければなりませんでした。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
この前に現在地取得のメソッド走らせたらどー?
概要
対応するIssue
#4