| Author |
Message |
jdoubleu Freshman
Joined: 01 Mar 2008 Posts: 3 Location: New York City
|
Posted: Tue Mar 25, 2008 5:53 pm Post subject: |
|
|
| 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 |
|
 |
gustavo Freshman
Joined: 02 Mar 2008 Posts: 6
|
Posted: Fri Mar 28, 2008 7:25 pm Post subject: |
|
|
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 |
|
 |
rahul_mawkins Developer
Joined: 27 Feb 2008 Posts: 34
|
Posted: Sat Mar 29, 2008 6:36 pm Post subject: after struggling whole night I did something new |
|
|
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 |
|
 |
plusminus Site Admin

Joined: 14 Nov 2007 Posts: 2067 Location: Germany
|
Posted: Sat Mar 29, 2008 6:49 pm Post subject: |
|
|
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 should work:
| Java: | double d = Double.parseDouble("37.423157") * 1E6; |
Regards,
plusminus _________________
| Android Development Community / Tutorials |
|
| Back to top |
|
 |
inter Junior Developer
Joined: 21 Feb 2008 Posts: 23
|
Posted: Mon Mar 31, 2008 4:57 am Post subject: |
|
|
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 |
|
 |
Kastagire Junior Developer
Joined: 29 Apr 2008 Posts: 10
|
Posted: Wed Apr 30, 2008 11:15 pm Post subject: |
|
|
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 |
|
 |
cadlg Experienced Developer
Joined: 20 Feb 2008 Posts: 68 Location: Guatemala
|
Posted: Wed Apr 30, 2008 11:33 pm Post subject: |
|
|
| Are you behind a proxy ? |
|
| Back to top |
|
 |
Kastagire Junior Developer
Joined: 29 Apr 2008 Posts: 10
|
Posted: Thu May 01, 2008 1:24 pm Post subject: |
|
|
| 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 |
|
 |
plusminus Site Admin

Joined: 14 Nov 2007 Posts: 2067 Location: Germany
|
Posted: Thu May 01, 2008 2:32 pm Post subject: |
|
|
| 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 |
|
 |
Kastagire Junior Developer
Joined: 29 Apr 2008 Posts: 10
|
Posted: Thu May 01, 2008 2:34 pm Post subject: |
|
|
| awesome! Thanks +/-! |
|
| Back to top |
|
 |
cbraun75 Junior Developer
Joined: 28 Jan 2008 Posts: 19 Location: Munich
|
Posted: Wed May 07, 2008 5:11 pm Post subject: regognizing crossing two roads |
|
|
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 |
|
 |
plusminus Site Admin

Joined: 14 Nov 2007 Posts: 2067 Location: Germany
|
Posted: Wed May 07, 2008 7:46 pm Post subject: Re: regognizing crossing two roads |
|
|
| 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
Regards,
plusminus _________________
| Android Development Community / Tutorials |
|
| Back to top |
|
 |
mana Freshman
Joined: 10 May 2008 Posts: 5
|
Posted: Wed Jun 11, 2008 4:10 pm Post subject: |
|
|
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 |
|
 |
plusminus Site Admin

Joined: 14 Nov 2007 Posts: 2067 Location: Germany
|
Posted: Thu Jun 12, 2008 1:40 pm Post subject: |
|
|
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 |
|
 |
|