andbook!.pdf - Learning Android Get an anddev.org - Android-Shirt Back to index
anddev.org Header Logo
FAQ Search Top rated articles Browse Feeds anddev.org - Authors Contact Details Register Log in

AndNav! - Android Map-Routing-System!

Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
       anddev.org - Android Development Community | Android Tutorials | Index -> Promote your Android Application
Author Message
windkiosk
Freshman
Freshman


Joined: 07 Mar 2008
Posts: 5

PostPosted: Fri Mar 07, 2008 2:46 am    Post subject: What's the route generate alogrithm you use. Reply with quote

Hi man:
Actually, i'm migrating a navigation product to Android platform for a compony.

My interesting is that what's the alogrithm you use to request route. You know, there are some guys in my compony who major in this function.

Thanks. BTW, your image rotate example help me a lot.
Back to top
View user's profile Send private message
plusminus
Site Admin
Site Admin


Joined: 14 Nov 2007
Posts: 2660
Location: College Park, MD

PostPosted: Fri Mar 07, 2008 2:52 pm    Post subject: Reply with quote

Hello windkiosk,

have a look at this tutorial:
Arrow Google Driving Directions - MapOverlayed.

May I know what company is bringing Navigation to Android-Devices Question

Regards,
plusminus

_________________
Download my apps Idea
Please remember, that this board is give & take Smile


| Android Development Community / Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website
windkiosk
Freshman
Freshman


Joined: 07 Mar 2008
Posts: 5

PostPosted: Sat Mar 08, 2008 8:21 am    Post subject: Reply with quote

Got it.

I will study later.

Thanks ~~~
Back to top
View user's profile Send private message
rahul_mawkins
Developer
Developer


Joined: 27 Feb 2008
Posts: 34

PostPosted: Mon Mar 10, 2008 10:25 am    Post subject: how to have a permanent zoom box on a map Reply with quote

When we display a mapview and slide our fingures on it zoom view comes up
What if I want this to be permamnently placed on right hand corner of my screen
or may on top of my screen horizontaly
mv.displayZoomDialog(10,10);
doesnt really work...though it shows the box for a sec and then whole mapview takes over
Back to top
View user's profile Send private message Yahoo Messenger
bavarol
Experienced Developer
Experienced Developer


Joined: 10 Dec 2007
Posts: 52

PostPosted: Thu Mar 13, 2008 4:06 pm    Post subject: Reply with quote

Hi plusminus, I can't do it, I don't know how I can show the red line, please let me now this little piece of code, perhaps I make a mistake in with the Path Class, Paint or something more. I'll get mad Sad

By the way, you have moved the other posts and you called the new theme "DrivingDirection: get Path already driven" but I don't use DrivingDirection Class as I said you but I'm a pedestrian and route is gone only a time.

Regards
Back to top
View user's profile Send private message
simegi
Freshman
Freshman


Joined: 12 Mar 2008
Posts: 3
Location: Italy

PostPosted: Thu Mar 13, 2008 9:38 pm    Post subject: Reply with quote

Hi, I'm a new anddev user.

This is a post verify Very Happy
Back to top
View user's profile Send private message
simegi
Freshman
Freshman


Joined: 12 Mar 2008
Posts: 3
Location: Italy

PostPosted: Thu Mar 13, 2008 9:52 pm    Post subject: Reply with quote

Hi plusminus, I have a problem with a Progress Dialog in a MapActivity. The dialog is displayed but
when I invoke dismiss() method the following error occur:



The source code of the ProgressDialog is:

Java:

progressDialog = ProgressDialog.show(getActivityContext(),"Searching Path",
                                        "Please wait while searching...", false,false);
                    threadDialog = new Thread(new Runnable() {
                         public void run() {
                              progressDialog.dismiss();
                         }
                    });
startFetchDirections(start_point,"",end_point,"");


Then, in startFetchDirections method, after that directions have been determinated the
threadDialog thread is launched with threadDialog.start(); as follow:
Java:

private void startFetchDirections(MapPoint from_pos, String from_name,
               MapPoint to_pos, String to_name) {
          
          /* mDD is a class variable for the activity that will
           * hold an instance of the DrivingDirection object created here. */

          myDD = new DrivingDirection(from_pos, from_name, to_pos, to_name);
          if (myDD != null) {
               /* Add the request the dispatcher */
               getDispatcher().addDataRequest(myDD);

               t = new Thread(new Runnable() {
                    public void run() {
                         
                         /*
                          * Wait for the search to be complete...
                          * or after 30 seconds search is interrupted
                          */

                         int elapsedTime = 0;
                         while (!myDD.isComplete() && elapsedTime < 300) {
                              
                              try {
                                   synchronized (waitObject){
                                     waitObject.wait(100);
                                     elapsedTime++;
                                   }         
                              }
                              catch (InterruptedException e) {
                                   Log.e("DEBUGTAG", "'!myDD.isComplete()' was interrupted.",e);
                              }
                         }
                         /* Check to see if any Placemarks were found..
                          * if 0 then there is no route! */

                         turns = myDD.getTurnPoints();
                         if (turns != null) {
                              /* Set a flag to let the program know
                               * the directions are done... */

                              foundDirections = true;
                              goToTurn(0);
                         }
                         else{/* no route.. */
                              foundDirections = false;
                              myDD = null;
                              /* Let the user know that no route was found... */
                              
                         }
                         synchronized (waitObject){
                           threadDialog.start();
                           waitObject.notifyAll();
                         }
                    }
               });
               
               waitObject = new Object();
               
               try {     
                synchronized (waitObject) {   
                     t.start();
                     waitObject.wait();
                }
               }
               catch (InterruptedException e) {e.printStackTrace();}
          }
     }


Can you hel me ?
Thanks in advance
Back to top
View user's profile Send private message
simegi
Freshman
Freshman


Joined: 12 Mar 2008
Posts: 3
Location: Italy

PostPosted: Tue Mar 18, 2008 11:41 am    Post subject: Reply with quote

simegi wrote:
Hi plusminus, I have a problem with a Progress Dialog in a MapActivity. The dialog is displayed but
when I invoke dismiss() method the following error occur:

android.policy.PhoneWindow$DecorView@401d2ab0 must be attached to a window

The source code of the ProgressDialog is:

Java:

progressDialog = ProgressDialog.show(getActivityContext(),"Searching Path",
                                        "Please wait while searching...", false,false);
                    threadDialog = new Thread(new Runnable() {
                         public void run() {
                              progressDialog.dismiss();
                         }
                    });
startFetchDirections(start_point,"",end_point,"");


Then, in startFetchDirections method, after that directions have been determinated the
threadDialog thread is launched with threadDialog.start(); as follow:
Java:

private void startFetchDirections(MapPoint from_pos, String from_name,
               MapPoint to_pos, String to_name) {
          
          /* mDD is a class variable for the activity that will
           * hold an instance of the DrivingDirection object created here. */

          myDD = new DrivingDirection(from_pos, from_name, to_pos, to_name);
          if (myDD != null) {
               /* Add the request the dispatcher */
               getDispatcher().addDataRequest(myDD);

               t = new Thread(new Runnable() {
                    public void run() {
                         
                         /*
                          * Wait for the search to be complete...
                          * or after 30 seconds search is interrupted
                          */

                         int elapsedTime = 0;
                         while (!myDD.isComplete() && elapsedTime < 300) {
                              
                              try {
                                   synchronized (waitObject){
                                     waitObject.wait(100);
                                     elapsedTime++;
                                   }         
                              }
                              catch (InterruptedException e) {
                                   Log.e("DEBUGTAG", "'!myDD.isComplete()' was interrupted.",e);
                              }
                         }
                         /* Check to see if any Placemarks were found..
                          * if 0 then there is no route! */

                         turns = myDD.getTurnPoints();
                         if (turns != null) {
                              /* Set a flag to let the program know
                               * the directions are done... */

                              foundDirections = true;
                              goToTurn(0);
                         }
                         else{/* no route.. */
                              foundDirections = false;
                              myDD = null;
                              /* Let the user know that no route was found... */
                              
                         }
                         synchronized (waitObject){
                           threadDialog.start();
                           waitObject.notifyAll();
                         }
                    }
               });
               
               waitObject = new Object();
               
               try {     
                synchronized (waitObject) {   
                     t.start();
                     waitObject.wait();
                }
               }
               catch (InterruptedException e) {e.printStackTrace();}
          }
     }


Can you hel me ?
Thanks in advance
Back to top
View user's profile Send private message
kadair
Junior Developer
Junior Developer


Joined: 16 Dec 2007
Posts: 17
Location: Cincinnati OH, United States

PostPosted: Sun Mar 23, 2008 7:31 am    Post subject: Reply with quote

Hi plusminus,

I'm trying to figure out how to rotate a BitMap overlay which represents my current location on a map. I have an arrow fairly similar to yours and I'm trying to get it pointing in the direction I'm headed -- I'm using the bearings from my current location. Everything I've read seems to imply that I should rotate the canvas and not the image. When I try this though my arrow eventually ends up off the map.

If anyone can help me with this I would be greatly appreciative.

Thanks! Very Happy

Ken

_________________
"Your imagination is your preview of life's coming attractions." - Einstein

http://www.AppSocial.com
Back to top
View user's profile Send private message Visit poster's website
kadair
Junior Developer
Junior Developer


Joined: 16 Dec 2007
Posts: 17
Location: Cincinnati OH, United States

PostPosted: Sun Mar 23, 2008 7:44 am    Post subject: Nevermind... Reply with quote

Thanks to this other thread...

http://www.anddev.org/resize_and_rotate_image_-_example-t621.html

I was able to get it working. Very Happy

_________________
"Your imagination is your preview of life's coming attractions." - Einstein

http://www.AppSocial.com
Back to top
View user's profile Send private message Visit poster's website
flowdi
Junior Developer
Junior Developer


Joined: 25 Nov 2007
Posts: 11

PostPosted: Sun Apr 06, 2008 12:29 pm    Post subject: integrate andnav Reply with quote

Hi plusminus,

this looks realy nice!
are you planning to provide ways for other applications to integrate with andnav?
provide custom intent actions
or register as intent-receiver for VIEW_ACTION and location-content-type...

e.g. geo-url in a website / email / feed ...
click on it and directly jump into andnav
(new Intent(NAVIGATE_THERE_ACTION, Uri.parse("geo://342543423,238737823"))

regards
flo
Back to top
View user's profile Send private message
plusminus
Site Admin
Site Admin


Joined: 14 Nov 2007
Posts: 2660
Location: College Park, MD

PostPosted: Mon Apr 07, 2008 6:36 pm    Post subject: Re: integrate andnav Reply with quote

Hey flowdi,

really good point.
Imo there is not yet an Action defined for that porpose.

Idea Btw: Test the current AndNav-Version...
Arrow http://www.trackdroid.com/info/nicolas-gramlich/andnav/0-3-2-a-0023

FYI this is just a demo which is using the mock gps provider.

As I'm pretty fed up with the DrivingDirections provided by Google, I'm doing it myself now.
(Digging deeper there were pretty much problems)

Regards,
plusminus

_________________
Download my apps Idea
Please remember, that this board is give & take Smile


| Android Development Community / Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Bruce.lntu
Developer
Developer


Joined: 03 Jan 2008
Posts: 37

PostPosted: Mon Apr 14, 2008 9:17 am    Post subject: Reply with quote

Hi plusminus,

when adb the "AndNav_20080412_v0[1].4.1_alpha.apk",it shows an error, the picture here


can you tell out what's the matter.

Regards
Bruce



andnav error2.png
 Description:
 Filesize:  66.94 KB
 Viewed:  4554 Time(s)

andnav error2.png




Last edited by Bruce.lntu on Fri Apr 25, 2008 3:49 am; edited 1 time in total
Back to top
View user's profile Send private message
plusminus
Site Admin
Site Admin


Joined: 14 Nov 2007
Posts: 2660
Location: College Park, MD

PostPosted: Mon Apr 14, 2008 10:37 pm    Post subject: Reply with quote

Hello Bruce,

it happened right when you clicked on "Quickstart..." ?

I'll release the version I am submitting to ADC very soon.... Shocked

Regards,
plusminus

_________________
Download my apps Idea
Please remember, that this board is give & take Smile


| Android Development Community / Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website
plusminus
Site Admin
Site Admin


Joined: 14 Nov 2007
Posts: 2660
Location: College Park, MD

PostPosted: Tue Apr 15, 2008 1:00 am    Post subject: Reply with quote

So there it is Smile

0.5.0 - Official ADC version Cool

DL: Arrow http://www.trackdroid.com/info/nicolas-gramlich/andnav

New Features:
  • Via Routes
  • Heavily improved Streetname-Autocompletion
  • Easier and better looking navigation through the "Search-Destination"-Process
  • Display-Quality-Modes (Low, Standard, High, Uber)
  • Multilingual Driving-Directions (all languages that came to my mind ^^. Basically all languages that GoogleMaps is avaibale on, are possible)
  • Stability Exclamation Wink

Interface AndNav from your own application with code like this:
Java:
     Intent navTo = new Intent("org.anddev.andnav.intent.action.NAV_TO");
     
     Bundle b = new Bundle();
     b.putString("to", "37.465259,-122.126456");
     navTo.putExtras(b);
     
     broadcastIntent(navTo);


Any feedback is welcome Smile

Regards,
plusminus

_________________
Download my apps Idea
Please remember, that this board is give & take Smile


| Android Development Community / Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
       anddev.org - Android Development Community | Android Tutorials | Index -> Promote your Android Application All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 3 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


© 2007, Android Development Community
All rights reserved.
Powered by phpBB.