启动目的地已预先填充的导航应用 [英] Launching a navigation app with destination pre-populated

查看:51
本文介绍了启动目的地已预先填充的导航应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想启动一个带有目的地的转弯导航应用程序(不使用移动数据).我使用cordova和javascript.我可以使用以下代码发射sygic和herewego,但经过大量更改后我无法通过目的地.目的地为纬度/经度格式.

I want to start a turn by turn navigation app (which does not use mobile data) with its destination. I use cordova and javascript. I can launch sygic and herewego with the code below but I cannot pass the destination after numerous changes. The destination is in latitude/longitude format.

我不介意使用哪个应用程序,只要它开始准备导航到目的地即可.我将不胜感激.

I don't mind which app is used as long as it starts ready to navigate to a destination. I would be grateful for any tips.

   window.plugins.launcher.launch({
        packageName:'com.sygic.aura',  // com.here.app.maps
  }    , hereSuccessCallback, hereErrorCallback);

推荐答案

一个较旧的线程,但如果其他人正在寻找类似的问题,则可能会很有用.在android上,可以通过传递以下属性来打开HERE WE GO应用程序

An older thread, but might be useful if someone else is looking for similar issue. On android the HERE WE GO app can be opened with intents by passing the following properties

action com.here.maps.DIRECTIONS
category CATEGORY_DEFAULT
data URI here.directions://v1.0/mylocation/37.870090,-122.268150,Downtown%20Berkeley?ref=<Referrer>&m=w

在iOS上

Open a URL with a custom here-route URL Scheme:
//mylocation/latitude,longitude with WGS 84 compliant latitude and longitude geocoordinates of the destination
Alternatively, you can replace the geocoordinate pair with a Place ID (as returned by a Places API query) to get directions to a specific POI instead of a latitude/longitude pair,URLencoded string as the name of the destination?ref=<Referrer>referrer (and can be something like your app or company name) &m=w to indicates the routing mode (m=w stands for walk, m=d for drive)

For instance, here-route://mylocation/37.870090,-122.268150,Downtown%20Berkeley?ref=<Referrer>&m=w requests a route by foot to a destination in downtown Berkeley by a company called Referrer.

( ="文档)

这篇关于启动目的地已预先填充的导航应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆