如何在Android上使用RouteBoxer.js为谷歌地图地图、如何在、RouteBoxer、Android

由网友(注定逃離不了)分享简介:我有一个路线。现在,我想找到附近所有的市场,例如,围绕这条路线。在网络版,我用RouteBox库成功。现在的问题是,我不能在Android上使用的谷歌地图,因为它是一个JavaScript库。I have a route. Now, I want to find all nearby markets, for exa...

我有一个路线。现在,我想找到附近所有的市场,例如,围绕这条路线。在网络版,我用RouteBox库成功。现在的问题是,我不能在Android上使用的谷歌地图,因为它是一个JavaScript库。

I have a route. Now, I want to find all nearby markets, for example, around that route. On web version, I use RouteBox library successfully. The problem is I can't use it in Google Map on Android, because it is a javascript library.

现在我该怎么办?如何使用Android上的图书馆或做我有一个解决办法的方式?

What can I do now? How can I use that library on Android or do I have a workaround way?

推荐答案

您可以从您的应用程序在Android中调用JavaScript。你需要用JS评估者为Android(JSEA)。

You can call javascript from your App in Android. You will need to use JS Evaluator for Android (JSEA).

就在做这样的事情:

jsEvaluator.callFunction(new JsCallback() {
  @Override
  public void onResult(final String result) {
    // get result here
  }
}, "functionName", "parameter 1", "parameter 2", 912, 101.3);

要打电​​话给你的JavaScript。

To call your javascript.

所以,你可以访问该库,让您与RouteBoxer API传达您的应用程序。只需选中它 Github上的JSEA 。它应该让你使用RouteBoxer像往常一样。

So, you can access the library that will allow you communicate your App with the RouteBoxer API. Just check it on Github for JSEA. It should allow you to use RouteBoxer as usual.

因此​​,您将调用的路线,从你的应用程序。

Hence, you will call the route from your App.

阅读全文

相关推荐

最新文章