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.
What can I do now? How can I use that library on Android or do I have a workaround way?
Google API is Javascript. It is also available in Flash. Bing map is using the same sytem and it is available in javascript or silverlight. You may also be interested in openstreetmap (free alternative).
google-places. js is a jQuery plugin which displays Google Places data (currently only reviews) on the page using Google Map's Places API.
You can call javascript from your App in Android. You will need to use JS Evaluator for Android (JSEA).
Just do something like:
jsEvaluator.callFunction(new JsCallback() {
@Override
public void onResult(final String result) {
// get result here
}
}, "functionName", "parameter 1", "parameter 2", 912, 101.3);
To call your javascript.
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.
As an alternative, you can also use a Java port of the RouteBoxer.js available here: https://code.google.com/p/routeboxer-java/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With