webview下js的gps定位
<html>
<head>
<title>Js调用Android</title>
</head>
<body>
<input type="button" value="Toast提示" onclick="myObj.startGps();"/>
<input type="button" value="列表对话框" onclick="myObj.showDialog();"/>
<p id="demo">Click the button to get your coordinates:</p>
<button onclick="getLocation()">Try It</button>
<script>
var x = document.getElementById("demo");
//在android代码中调用此方法
function showInfoFromJava(msg) {
alert("来自客户端的信息:"+msg);
}
function getLocation() {
console.info("getLocation working")
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition,showError);
} else {
x.innerHTML = "Geolocation is not supported by thi