android - google map v3从sql加载标记

时间:2023-01-15 21:00:14

I create a google map web page where the lat and lon is loaded from local host mysql and save as .txt and will be load and mark to the google map web page and It work, So is it possible to convert it as an android webview ? or there is an much easier way.

我创建了一个谷歌地图网页,其中lat和lon从本地主机mysql加载并保存为.txt并将加载并标记到谷歌地图网页,它工作,所以是否可以将其转换为Android webview ?或者有一种更简单的方法。

1 个解决方案

#1


0  

With regard to using webView in Android , try this SO thread:

关于在Android中使用webView,请尝试以下SO线程:

WebView webview = (WebView) findViewById(R.id.webView1);
webview.setWebViewClient(new WebViewClient());
webview.getSettings().setJavaScriptEnabled(true);
//just replace the actual latlong values with your variables from SQL
webview.loadUrl("http://maps.google.com/maps?" + "saddr=43.0054446,-87.9678884" + "&daddr=42.9257104,-88.0508355");

There's also a Using PHP/MySQL with Google Maps guide from Google docs where you store latlng values in SQL and load the markers to the map with the help of PHP.

还有来自Google文档的使用PHP / MySQL和谷歌地图指南,您可以在SQL中存储latlng值,并在PHP的帮助下将标记加载到地图中。

This video demo might help in the implementation.

此视频演示可能有助于实施。

#1


0  

With regard to using webView in Android , try this SO thread:

关于在Android中使用webView,请尝试以下SO线程:

WebView webview = (WebView) findViewById(R.id.webView1);
webview.setWebViewClient(new WebViewClient());
webview.getSettings().setJavaScriptEnabled(true);
//just replace the actual latlong values with your variables from SQL
webview.loadUrl("http://maps.google.com/maps?" + "saddr=43.0054446,-87.9678884" + "&daddr=42.9257104,-88.0508355");

There's also a Using PHP/MySQL with Google Maps guide from Google docs where you store latlng values in SQL and load the markers to the map with the help of PHP.

还有来自Google文档的使用PHP / MySQL和谷歌地图指南,您可以在SQL中存储latlng值,并在PHP的帮助下将标记加载到地图中。

This video demo might help in the implementation.

此视频演示可能有助于实施。