| Author |
Message |
windkiosk Freshman

Joined: 07 Mar 2008 Posts: 5
|
Posted: Fri Mar 07, 2008 2:46 am Post subject: What's the route generate alogrithm you use. |
|
|
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 |
|
 |
|
|
 |
plusminus Site Admin


Joined: 14 Nov 2007 Posts: 2660 Location: College Park, MD
|
Posted: Fri Mar 07, 2008 2:52 pm Post subject: |
|
|
Hello windkiosk,
have a look at this tutorial:
Google Driving Directions - MapOverlayed.
May I know what company is bringing Navigation to Android-Devices
Regards,
plusminus
_________________
Download my apps  Please remember, that this board is give & take 
| Android Development Community / Tutorials |
|
| Back to top |
|
 |
windkiosk Freshman

Joined: 07 Mar 2008 Posts: 5
|
Posted: Sat Mar 08, 2008 8:21 am Post subject: |
|
|
Got it.
I will study later.
Thanks ~~~
|
|
| Back to top |
|
 |
rahul_mawkins Developer

Joined: 27 Feb 2008 Posts: 34
|
Posted: Mon Mar 10, 2008 10:25 am Post subject: how to have a permanent zoom box on a map |
|
|
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 |
|
 |
bavarol Experienced Developer

Joined: 10 Dec 2007 Posts: 52
|
Posted: Thu Mar 13, 2008 4:06 pm Post subject: |
|
|
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
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 |
|
 |
simegi Freshman

Joined: 12 Mar 2008 Posts: 3 Location: Italy
|
Posted: Thu Mar 13, 2008 9:38 pm Post subject: |
|
|
Hi, I'm a new anddev user.
This is a post verify
|
|
| Back to top |
|
 |
|
|
 |
simegi Freshman

Joined: 12 Mar 2008 Posts: 3 Location: Italy
|
Posted: Thu Mar 13, 2008 9:52 pm Post subject: |
|
|
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 |
|
 |
simegi Freshman

Joined: 12 Mar 2008 Posts: 3 Location: Italy
|
Posted: Tue Mar 18, 2008 11:41 am Post subject: |
|
|
| 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 |
|
 |
kadair Junior Developer

Joined: 16 Dec 2007 Posts: 17 Location: Cincinnati OH, United States
|
Posted: Sun Mar 23, 2008 7:31 am Post subject: |
|
|
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!
Ken
_________________ "Your imagination is your preview of life's coming attractions." - Einstein
http://www.AppSocial.com |
|
| Back to top |
|
 |
kadair Junior Developer

Joined: 16 Dec 2007 Posts: 17 Location: Cincinnati OH, United States
|
|
| Back to top |
|
 |
flowdi Junior Developer


Joined: 25 Nov 2007 Posts: 11
|
Posted: Sun Apr 06, 2008 12:29 pm Post subject: integrate andnav |
|
|
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 |
|
 |
plusminus Site Admin


Joined: 14 Nov 2007 Posts: 2660 Location: College Park, MD
|
Posted: Mon Apr 07, 2008 6:36 pm Post subject: Re: integrate andnav |
|
|
Hey flowdi,
really good point.
Imo there is not yet an Action defined for that porpose.
Btw: Test the current AndNav-Version...
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  Please remember, that this board is give & take 
| Android Development Community / Tutorials |
|
| Back to top |
|
 |
Bruce.lntu Developer


Joined: 03 Jan 2008 Posts: 37
|
Posted: Mon Apr 14, 2008 9:17 am Post subject: |
|
|
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
| Description: |
|
| Filesize: |
66.94 KB |
| Viewed: |
4554 Time(s) |

|
Last edited by Bruce.lntu on Fri Apr 25, 2008 3:49 am; edited 1 time in total |
|
| Back to top |
|
 |
plusminus Site Admin


Joined: 14 Nov 2007 Posts: 2660 Location: College Park, MD
|
Posted: Mon Apr 14, 2008 10:37 pm Post subject: |
|
|
Hello Bruce,
it happened right when you clicked on "Quickstart..." ?
I'll release the version I am submitting to ADC very soon....
Regards,
plusminus
_________________
Download my apps  Please remember, that this board is give & take 
| Android Development Community / Tutorials |
|
| Back to top |
|
 |
plusminus Site Admin


Joined: 14 Nov 2007 Posts: 2660 Location: College Park, MD
|
|
| Back to top |
|
 |
|
|
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.
|