菊池
名前を入れる前に、マップにちゃんと経路案内がされるかテストをしてほしいです。名前の機能を入れる前にそこで間違いがあったら危ないので、それで何かありましたら言ってください
This commit is contained in:
parent
26516e48cf
commit
7e9b9eb751
|
@ -5,8 +5,9 @@
|
||||||
<option name="linkedExternalProjectsSettings">
|
<option name="linkedExternalProjectsSettings">
|
||||||
<GradleProjectSettings>
|
<GradleProjectSettings>
|
||||||
<option name="testRunner" value="GRADLE" />
|
<option name="testRunner" value="GRADLE" />
|
||||||
|
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
<option name="gradleJvm" value="JDK" />
|
||||||
<option name="modules">
|
<option name="modules">
|
||||||
<set>
|
<set>
|
||||||
<option value="$PROJECT_DIR$" />
|
<option value="$PROJECT_DIR$" />
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
|
|
@ -33,14 +33,15 @@ public class Maps extends FragmentActivity implements View.OnClickListener {
|
||||||
webSettings.setJavaScriptEnabled(true);
|
webSettings.setJavaScriptEnabled(true);
|
||||||
webView.setWebViewClient(new WebViewClient());
|
webView.setWebViewClient(new WebViewClient());
|
||||||
|
|
||||||
// ここにデータを入れておいてください、処理は[/]で区切っています
|
// ここにデータを入れておいてください、処理は[/]で区切っています(緯度と経度で入れているので、そこで一度試してください
|
||||||
loadMapInWebView("35.09050879999539,136.87845379325216/35.09284820618655,136.88165119390393/35.09364708442631,136.88171563326418");
|
loadMapInWebView("35.09050879999539,136.87845379325216/35.091950716938875, 136.8826598363985/35.09273643623442, 136.88154941341296");
|
||||||
}
|
}
|
||||||
|
|
||||||
// WebViewの処理です(Mapの中の処理をやっています)
|
// WebViewの処理です(Mapの中の処理をやっています)
|
||||||
private void loadMapInWebView(String locations) {
|
private void loadMapInWebView(String locations) {
|
||||||
// 区切ることで、追加の地点を入れて、最終地点にピンを打ってある状態です
|
// 区切ることで、追加の地点を入れて、最終地点にピンを打ってある状態です
|
||||||
String[] locArray = locations.split("/");
|
String[] locArray = locations.split("/");
|
||||||
|
|
||||||
// ↓URLで経路案内(車)での表示をしています
|
// ↓URLで経路案内(車)での表示をしています
|
||||||
StringBuilder urlBuilder = new StringBuilder("https://www.google.com/maps/dir/?api=1&travelmode=driving");
|
StringBuilder urlBuilder = new StringBuilder("https://www.google.com/maps/dir/?api=1&travelmode=driving");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user