• 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:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

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

 
Ranch Hand
Posts: 1290
  • 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: 23714
50
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: 4864
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: 1290
  • 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: 4864
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: 1290
  • 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: 1290
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!