Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

how to get a longitude & latitude from a given address  RSS feed

 
Ranch Hand
Posts: 1288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to get a longitude & latitude from a given address ?
can any one tell me ?
 
Sheriff
Posts: 23640
48
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are web services you can contact for this sort of information. The one we use where I work belongs to Google: The Google Geocoding API. The word for what you want to do is "geocoding".
 
Saloon Keeper
Posts: 4683
117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's what the android.location.Geocoder class does.
 
sam liya
Ranch Hand
Posts: 1288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is my java class


this is my main xml



this is the exception i am getting




}
 
Tim Moores
Saloon Keeper
Posts: 4683
117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So Android can't find the com.draw.FindLocation class - is it part of the .apk file? It's not part of Android itself.
 
sam liya
Ranch Hand
Posts: 1288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I create a new project

this is my java class



this is main.xml


this is geocodexml file


this is th\e error


 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is working code:

SearchByAddress.java


view.xml
 
sam liya
Ranch Hand
Posts: 1288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I try this with your example .then it gives this error.please see attachment.
error.jpg
[Thumbnail for error.jpg]
 
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Instead of posting attachments, it would help if you copy paste the stack trace
 
Michal Krawczyk
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I run my code which I paste above and everything is ok.
Execution result is on the image placed here

Your console says there is a problem with your device. You tried run application once or maybe more?

You can try choose your Android API version 1.6, I know that can help sometimes.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!