93 lines
3.5 KiB
HTML
93 lines
3.5 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<title>Example Capacitor App - DumonGeolocation</title>
|
|
<meta
|
|
name="viewport"
|
|
content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
|
|
/>
|
|
<meta name="format-detection" content="telephone=no" />
|
|
<style>
|
|
body {
|
|
font-family: sans-serif;
|
|
margin: 1rem;
|
|
background-color: #ffffff;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 1.2rem;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
button {
|
|
margin-right: 0.5rem;
|
|
margin-bottom: 0.5rem;
|
|
padding: 8px 16px;
|
|
font-size: 1rem;
|
|
border: none;
|
|
background-color: #3366ff;
|
|
color: white;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
pre {
|
|
background-color: #f8f8f8;
|
|
padding: 1rem;
|
|
border: 1px solid #ccc;
|
|
border-radius: 6px;
|
|
overflow-x: auto;
|
|
white-space: pre-wrap;
|
|
font-size: 0.9rem;
|
|
max-height: 70vh;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>Capacitor DumonGeolocation Plugin Test</h1>
|
|
|
|
<button id="startButton">Start Positioning</button>
|
|
<button id="stopButton">Stop Positioning</button>
|
|
<button id="getLatestButton">Get Latest Position</button>
|
|
<button id="permButton">Request Permissions</button>
|
|
<button id="clearLogButton" style="background-color:#999">Clear Log</button>
|
|
|
|
<h1>Modes</h1>
|
|
<button id="drivingBtn">Driving Mode</button>
|
|
<button id="normalBtn">Normal Mode</button>
|
|
|
|
<h1>Options</h1>
|
|
<div style="display:flex;gap:1rem;flex-wrap:wrap">
|
|
<div>
|
|
<label><input type="checkbox" id="optEnableForwardPrediction" /> enableForwardPrediction</label><br />
|
|
<label><input type="checkbox" id="optEmitGnssStatus" /> emitGnssStatus</label><br />
|
|
<label><input type="checkbox" id="optEnableWifiRtt" checked /> enableWifiRtt</label><br />
|
|
<label><input type="checkbox" id="optEnableLogging" checked /> enableLogging</label><br />
|
|
<label><input type="checkbox" id="optSuppressMocked" /> suppressMockedUpdates</label><br />
|
|
<label><input type="checkbox" id="optKeepScreenOn" /> keepScreenOn</label><br />
|
|
</div>
|
|
<div>
|
|
<label>emitDebounceMs <input type="number" id="optEmitDebounceMs" placeholder="1000" /></label><br />
|
|
<label>drivingEmitIntervalMs <input type="number" id="optDrivingEmitIntervalMs" placeholder="1600" /></label><br />
|
|
<label>wifiScanIntervalMs <input type="number" id="optWifiScanIntervalMs" placeholder="3000" /></label><br />
|
|
</div>
|
|
<div>
|
|
<label>distanceThresholdMeters <input type="number" step="0.1" id="optDistanceThreshold" placeholder="7.0" /></label><br />
|
|
<label>speedChangeThreshold <input type="number" step="0.1" id="optSpeedThreshold" placeholder="0.5" /></label><br />
|
|
<label>directionChangeThreshold <input type="number" step="0.01" id="optDirectionThreshold" placeholder="0.17" /></label><br />
|
|
<label>maxPredictionSeconds <input type="number" step="0.1" id="optMaxPrediction" placeholder="1.0" /></label><br />
|
|
</div>
|
|
</div>
|
|
<button id="applyOptionsButton" style="background-color:#2e7d32">Apply Options</button>
|
|
|
|
<h1>Diagnostics</h1>
|
|
<button id="getGnssStatusButton">Get GNSS Status</button>
|
|
<button id="getLocationServicesStatusButton">Get Location Services Status</button>
|
|
|
|
<pre id="logArea"></pre>
|
|
|
|
<script type="module" src="./js/example.js"></script>
|
|
</body>
|
|
</html>
|