Map Tutorials

Tutorials that use the MapActivity. Many using GPS functionality.

Map Tutorials

Postby biosopher » Wed Apr 09, 2008 8:13 pm

I would never have made it through creating Pocket Journey for submitting to the Android Challenge without all the tutorials and discussions people have posted. I've created a couple tutorials myself.

I just posted an announcement video & screenshots of Pocket Journey:

http://www.pocketjourney.com/androidVideo.do

The few tutorials I've created already cover some of the coding
techniques shown in the screenshots below:

http://www.pocketjourney.com/androidTutorials.do

Image
Image
Image
Image


Cheers,
Anthony
Last edited by biosopher on Fri Aug 22, 2008 3:42 pm, edited 3 times in total.
biosopher
Developer
Developer
 
Posts: 26
Joined: Sat Mar 15, 2008 8:14 pm
Location: San Francisco, California

Top

Regarding getting map pixels....

Postby tv_sathish » Sat Apr 12, 2008 5:57 pm

Hi Anthony,
Since as per your post, you are offering help, can you help me out the reason for the following problem?

In the Google Driving Directions overlayed project posted by Plusminus, I debugged the code and found that I got Driving Directions indeed. But the following piece of code in the draw method of the map overlay

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. /* Loop through all MapPoints returned. */
  3.  
  4. for (MapPoint current : route) {
  5.  
  6.         /* Transform current MapPoint's Lat/Lng
  7.  
  8.          * into corresponding point on canvas
  9.  
  10.          * using the pixelCalculator. */
  11.  
  12.         if(current != null){
  13.  
  14.                           MapToScreenCoords(current, pxC, screenCoords)
  15.  
  16.  ...
  17.  
  18.  
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


I am getting the same values for the co-ordinates for all points. In fact, the mapPoint.getXPixel is returning the same value for all map points in the route. Because of this, nothing is coming on the map. Can you help me as to why this could be? I even reinitialized the "screenCoords" array inside the loop? When i have the device current lat/lon like 37.4343 and -122.434543 and a new lat/lon like 37.4343 and -122.909034 where the difference in the longtitude is about 0.4 or so, I get a different pair of co-ordinates (atleast in Y direction), but when the difference is less than or equal to 0.2, same coordinates are resulting.

However, in the case where the screen - coordinates are different, the line between the two map points stretches into the "sea" in the map rather than a small line.

Regards,
TVP
tv_sathish
Developer
Developer
 
Posts: 29
Joined: Wed Jan 09, 2008 12:32 pm

Postby biosopher » Sun Apr 13, 2008 5:47 am

Hi tv_sathish,

I'll be glad to help.

I would have emailed directly but couldn't find an email in your profile. Please send me either the class with this code or both the entire method with the problem plus the method that's calling it so I'll be able to track down the problem quicker.

You can send me the code at "anthony at pocketourney.com".

Tanks,
Anthony
biosopher
Developer
Developer
 
Posts: 26
Joined: Sat Mar 15, 2008 8:14 pm
Location: San Francisco, California

Postby plusminus » Sun Apr 13, 2008 10:53 pm

Hey guys,

I wrote a class that replaces the current DrivingDirections class.
Its not a 1:1 replacement, but it took me only 10 minutes to adapt my pretty complex andnav to this new implementation.

I'm probably going to release it next weekend. (After ADC and some more stress... :( )

It also supports Via-Route (aka: "From A via B via C via D to E"). I just did a route from Google HQ (In San Francisco) to Manhatten and back to S.F. which consists over 26000 (!!!) Points! And it worked :)

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby com2usprav » Mon Apr 28, 2008 9:46 am

This is For M3 SDK . If we Are using M5 SDK .The PlaceMark and search Operations are all Missing . One has use The Geocoder API to for perfoming these search Stuffs and all . Cany one has done the search operation in M5 SDK . if done pls Send me the Code

Cheers
Pravin Kumar
User avatar
com2usprav
Developer
Developer
 
Posts: 26
Joined: Sat Mar 29, 2008 3:28 pm
Location: Bangalore

Postby Draffodx » Wed Mar 25, 2009 11:14 am

Hi biosopher,

I have tried to implement your pop up window code in my application but keep getting a force close when I try to run it, I have sent you a private message with more information, can you help?
Draffodx
Master Developer
Master Developer
 
Posts: 205
Joined: Wed Nov 12, 2008 2:31 pm

Top

Return to Map Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest