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

Google Driving Directions - MapView overlayed

Goto page Previous  1, 2, 3
 
       anddev.org - Android Development Community | Android Tutorials | Index -> Map Tutorials
Author Message
jdoubleu
Freshman


Joined: 01 Mar 2008
Posts: 3
Location: New York City

PostPosted: Tue Mar 25, 2008 5:53 pm    Post subject: Reply with quote

inter wrote:
Thank minus for reply quickly

When i debug the program above .I see that the method draw is called first when the program launch .But when i click the button "Show me the route " i think it will call the method draw ,but it doesn't call .Why that . how to call the method draw when i click the button "Show me the route"

i copied 1-1 your program ,but it's not work .

help me

thanks

regard


I had a similar problem and plusminus suggested i make this call

myMapView.invalidate();

to force the map to redraw. I haven't had time to try it out yet, but give it a try and let us know if it fixed your issue.

-jw
Back to top
View user's profile Send private message Send e-mail Visit poster's website
gustavo
Freshman


Joined: 02 Mar 2008
Posts: 6

PostPosted: Fri Mar 28, 2008 7:25 pm    Post subject: Reply with quote

Hi!

I have a silly doubt, how to convert the strings coordinates: 37.423157,-122.085008 to int: 37423157, -122085008
like you did on the code above?

Java:
       /* Submit one dummy search */
          findViewById(R.id.cmd_submit).setOnClickListener(new OnClickListener(){
               @Override
               public void onClick(View arg0) {
                    MapPoint mpFrom = new MapPoint(37423157, -122085008); // 37.423157,-122.085008
                    MapPoint mpTo = new MapPoint(37495999, -122457508); // 37.495999,-122.457508
                    MyDrivingDirectionsActivity.this.startFetchDirections(mpFrom,"", mpTo, "");
               }
          });


Thx in advance.
Gustavo Ávila
VirtualSite
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
rahul_mawkins
Developer


Joined: 27 Feb 2008
Posts: 34

PostPosted: Sat Mar 29, 2008 6:36 pm    Post subject: after struggling whole night I did something new Reply with quote

following this application I found that if start and end are way too far the current zoom level dont allow two pins and route to be shown in map

I found a way how to dynamically adjust the zoom level so that whatever two destinations you add you can still see the two pins on map
for e.g
NJ to MA is hardly 215 miles
NJ to IL is 785miles
MA to CA is 3000 miles

But the zoom level which is calculated dynamically according to latitude/longitude and points on map shows it

Dont know if my ignorence allowed me to waste whole night or some of us are facing this problem also

If you are in same boat do let me know I will paste the code here
Back to top
View user's profile Send private message Yahoo Messenger
plusminus
Site Admin


Joined: 14 Nov 2007
Posts: 2067
Location: Germany

PostPosted: Sat Mar 29, 2008 6:49 pm    Post subject: Reply with quote

Hello gustavo,

gustavo wrote:
I have a silly doubt, how to convert the strings coordinates: 37.423157,-122.085008 to int: 37423157, -122085008
like you did on the code above?

Java:
       /* Submit one dummy search */
          findViewById(R.id.cmd_submit).setOnClickListener(new OnClickListener(){
               @Override
               public void onClick(View arg0) {
                    MapPoint mpFrom = new MapPoint(37423157, -122085008); // 37.423157,-122.085008
                    MapPoint mpTo = new MapPoint(37495999, -122457508); // 37.495999,-122.457508
                    MyDrivingDirectionsActivity.this.startFetchDirections(mpFrom,"", mpTo, "");
               }
          });


You mean using code ?
Something like Arrow Down should work:
Java:
double d = Double.parseDouble("37.423157") * 1E6;


Regards,
plusminus

_________________

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


Joined: 21 Feb 2008
Posts: 23

PostPosted: Mon Mar 31, 2008 4:57 am    Post subject: Reply with quote

Hello ,plusminus

You are very "pro" in Android .I want to get coordinate (lattitude,longtitude) on Map when i click a point on a map
screen . I aslo have question silly .Map Activity used "rmi" technology ??? And i don't understand this code

this.getDispatcher().addDataRequest(this.myDD);

Please help me
thanks
regard
Back to top
View user's profile Send private message
Kastagire
Junior Developer


Joined: 29 Apr 2008
Posts: 10

PostPosted: Wed Apr 30, 2008 11:15 pm    Post subject: Reply with quote

I went through this tutorial, but I am unable to get the map to show up. The emulator just shows a grid with a circle in the middle, and then the button from the layout. Pardon my ignorance, but I am new to both JAVA and Android. It looks like I would need to DL a maptile from Google, but I am not sure how to go about doing that.

any help is appreciated!

Thanks!
Back to top
View user's profile Send private message
cadlg
Experienced Developer


Joined: 20 Feb 2008
Posts: 68
Location: Guatemala

PostPosted: Wed Apr 30, 2008 11:33 pm    Post subject: Reply with quote

Are you behind a proxy ?
Back to top
View user's profile Send private message
Kastagire
Junior Developer


Joined: 29 Apr 2008
Posts: 10

PostPosted: Thu May 01, 2008 1:24 pm    Post subject: Reply with quote

Yes most likely..... if that is the case, if I were not behind a proxy, would it go and get the map tile automatically?
Back to top
View user's profile Send private message
plusminus
Site Admin


Joined: 14 Nov 2007
Posts: 2067
Location: Germany

PostPosted: Thu May 01, 2008 2:32 pm    Post subject: Reply with quote

Kastagire wrote:
Yes most likely..... if that is the case, if I were not behind a proxy, would it go and get the map tile automatically?


Exactly.

Regards,
plusminus

_________________

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


Joined: 29 Apr 2008
Posts: 10

PostPosted: Thu May 01, 2008 2:34 pm    Post subject: Reply with quote

awesome! Thanks +/-!
Back to top
View user's profile Send private message
cbraun75
Junior Developer


Joined: 28 Jan 2008
Posts: 19
Location: Munich

PostPosted: Wed May 07, 2008 5:11 pm    Post subject: regognizing crossing two roads Reply with quote

Hi just one question,

google has a driving direction.
Has anybody an idea if I can regognize (I travel on a road from point a to b) the next incoming roads or one road that crosses this road. Because I need this to get roadsections to save data to this road sections which i get from the gps and the CAN -bus of a car. Or has anybody another idea to devide the driven road in sections. But it must be always the same section length for all users?

Maybe someone has an idea?

Thanxx

Christian
Back to top
View user's profile Send private message AIM Address
plusminus
Site Admin


Joined: 14 Nov 2007
Posts: 2067
Location: Germany

PostPosted: Wed May 07, 2008 7:46 pm    Post subject: Re: regognizing crossing two roads Reply with quote

cbraun75 wrote:
Hi just one question,

google has a driving direction.
Has anybody an idea if I can regognize (I travel on a road from point a to b) the next incoming roads or one road that crosses this road. Because I need this to get roadsections to save data to this road sections which i get from the gps and the CAN -bus of a car. Or has anybody another idea to devide the driven road in sections. But it must be always the same section length for all users?

Maybe someone has an idea?

Thanxx

Christian


Hello Christian,

imo this is really really hard (probably impossible if you want the results to be satisfying) to do this just with GoogleMaps, as one does not have access to the underlying mapdata.

But there is a route service (imo they had xml-reponse to requests) to get nearby streets, what could be a tiny point to start with. But unfortunately I forgot the name of that service Sad

Regards,
plusminus

_________________

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


Joined: 10 May 2008
Posts: 5

PostPosted: Wed Jun 11, 2008 4:10 pm    Post subject: Reply with quote

Hi All,
is it possible to start the Overlay class with an Intent ? That you only send the coord. (x,y) with the Intent and then you draw the PINs and so on ?
Is that possible ?
Thanks.
Back to top
View user's profile Send private message
plusminus
Site Admin


Joined: 14 Nov 2007
Posts: 2067
Location: Germany

PostPosted: Thu Jun 12, 2008 1:40 pm    Post subject: Reply with quote

Yes it is.
Look in the apidocs for registerReceiver, so you can handle intents directly within your activity.

Regards,
plusminus

_________________

| 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 -> Map Tutorials All times are GMT + 1 Hour
Goto page Previous  1, 2, 3
Page 3 of 3

 
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.