|
@@ -7,11 +7,12 @@ import { openGaoDe } from "./appLauncher";
|
|
|
await InAppBrowser.addListener(
|
|
|
"browserPageNavigationCompleted",
|
|
|
async (data) => {
|
|
|
- if (data.url.indexOf("amap.com/navigation") > -1) {
|
|
|
+ if (data.url.indexOf("go=gaode") > -1) {
|
|
|
const params = new URLSearchParams(data.url);
|
|
|
- const to = params.get("to");
|
|
|
- await openGaoDe(to[0], to[1], to[2]);
|
|
|
- // await InAppBrowser.close();
|
|
|
+ const lat = params.get("latitude");
|
|
|
+ const lan = params.get("longitude");
|
|
|
+ const address = params.get("address");
|
|
|
+ await openGaoDe(lat,lan, address);
|
|
|
}
|
|
|
}
|
|
|
);
|