如何在Android上使用RouteBoxer.js为谷歌地图 [英] How to use RouteBoxer.js for Google Map on Android

查看:435
本文介绍了如何在Android上使用RouteBoxer.js为谷歌地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个路线。现在,我想找到附近所有的市场,例如,围绕这条路线。在网络版,我用<一个href="http://google-maps-utility-library-v3.google$c$c.com/svn/trunk/routeboxer/docs/examples.html">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.

这篇关于如何在Android上使用RouteBoxer.js为谷歌地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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