Git Product home page Git Product logo

mapnavigator's People

Contributors

tyczj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mapnavigator's Issues

direction is always returning null

Hi,

This library is quite good. I am a newbie to android and trying to learn the new maps apiV2.

I am experimenting with your library: I would like to know how to you get the distance and duration for path.
I am having some troubles. The directions returned is always null. Can you help me how to use the api to retrieve the distance and duration.

This is how I tried to retrieve the distance:
Navigator nav = new Navigator(googleMap,start,end);
nav.findDirections(true);
String strDis;
Directions directs = nav.getDirections();
if(directs != null){
strDis = nav.getDirections().getRoutes().get(0).getDistance();
strDis +="inHere";
}
else{
strDis ="none";
}

I also tried using the Interface
@OverRide
public void onPathSetListener(Directions directions) {
if(directions != null){
String strD = directions.getRoutes().get(0).getDistance();
mDistanceView.setText(strD);
}

}

Usage Question

Am I going to run into a usage problem. As in if I have this updating every couple of minutes I'll hit a quota of sorts and then no longer be able to use this library or does it have an unlimited amount of uses? I'm just asking because I would hate to release this and then run into people complaining that the directions aren't working because they used the crap out of it that month and that user hit their quota of uses for that month. Just curious.

By the way I checked this out this morning very slick job thank you for this it awesome. I love the simplicity of it I wish Google would have done something like this in the first place when they created the freaking thing. To make it easier on the Developer.

hide or remove a route polyline when another is called

Hi, thanks for this library that works perfect. I have a question and i hope you can get me into the right way.

I draw a route from two point (fixed), and clicking in the infoview the route (polyline) will drawn into the map and it works. By the way i have 20 different marker, and i want to draw a route only when click on the infoview. I mean, if there is already a route in the map, clicking in one other infoview, this route have to be removed and the new one has to be added in the map.

I have a Switch-case method to call each route by clicking in the infoview of the marker, this is a snippet of my code:

switch (markerIndex){
case 0:

                    start = new LatLng(22.28861858, 11.32771726);
                    end = new LatLng(22.48861858, 11.36779726);

                    Routing routing = new Routing(Routing.TravelMode.WALKING);
                    routing.registerListener(ActivityOutdoor.this);
                    routing.execute(start, end);

                    break;
                case 1:
                    start = new LatLng(21.48861858, 11.32771726);
                    end = new LatLng(23.48861858, 13.36779726);

                    Routing routing1 = new Routing(Routing.TravelMode.WALKING);
                    routing1.registerListener(ActivityOutdoor.this);
                    routing1.execute(start, end);
                    break;

                default:
                    break;


            }

Do you know how to remove the previous route, when click the other infoview?
I used map.clear(); but it will delete all the content of the map
Thanks in advance
Brus

Hide previous directions on creation of new directions?

Hey, love the library and I have used it in an application & when I push the update to Store, I'll credit you. Just wanted to know if you could add it so that the previous routes are cleared on Map once we created a new one. Thanks.

Getting/Showing route not possible on Android 5.x

I have a strange bug on Android 5.0 - 5.1.1 with getting routes from maps.googleapis.com/maps/api/directions/json.

With Android 4.0 - 4.4.2 everything works perfect!

The only useful crashlog until now was:

java.lang.IllegalArgumentException
at android.os.Parcel.nativeAppendFrom(Native Method)
at android.os.Parcel.appendFrom(Parcel.java:440)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1300)
at android.os.Bundle.writeToParcel(Bundle.java:1096)
at android.os.Parcel.writeBundle(Parcel.java:663)
at android.location.Location.writeToParcel(Location.java:912)
at android.os.Parcel.writeParcelable(Parcel.java:1357)
at android.os.Parcel.writeValue(Parcel.java:1262)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:638)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1313)
at android.os.Bundle.writeToParcel(Bundle.java:1096)
at android.os.Parcel.writeBundle(Parcel.java:663)
at android.app.ActivityManagerProxy.activityStopped(ActivityManagerNative.java:2901)
at android.app.ActivityThread$StopInfo.run(ActivityThread.java:3290)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)

Can anyone else reproduce this bug?

Thanks in advance!

Navigation in what sense this library is used

I want to know one kind of navigation is just making path between two points and second is while you are traveling in car along the path it will guide you your current location on path with right and left directions. So i want to ask what are the capabilities of this library regarding both scenarios?

nav.getDirections returns null

it is really a very good job and i have tried your library and it works 100% fine, but i am trying to get a list of geopoints of the route so the first step is that i try to get the directions by Directions dir = nav.getDirections() but it returns null. can you please help me.
Thank you.

getDuration()

Hello, was wondering how to call the getDuration() method in the Route class and will it return the total time of the trip? Thank you.

How to set the setMode() ?

How to set the nav.setMode() ?

Can you please give an example ?

It says setMode(mode, arrivalTime, avoid);

how to set the parameter ?

I am new to this , so please help me.

getDistance() returns null !

what's wrong with my code :

Route route;
final Navigator nav = new Navigator(map, myLocation, Destination);
nav.findDirections(false);
nav.setOnPathSetListener(new OnPathSetListener() {
@OverRide
public void onPathSetListener(Directions directions) {
// TODO Auto-generated method stub
route = directions.getRoutes().get(0);
txt.setText("dist: "+route.getDistance());
}});

the result is this : "dist: null"

Crash Question

I am using SupportMapFragments in my application and it is crashing when implementing the library calling it as described in the readme. Could this be why?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.