codename one map coordinates from address

219 views
Skip to first unread message

test

unread,
Jan 6, 2014, 12:59:47 AM1/6/14
to codenameone...@googlegroups.com
Hi,

How to get Map coordinates from address in codename one.

I have two options to locate location on map.

either from address or co-ordinates.

For Current Location i have used :  Location loc = LocationManager.getLocationManager().getCurrentLocationSync();

For Given Co-ordinates i have used :
String address="23.039568,71.566004";
 Location location = new Location();
 location.setLatitude(Double.parseDouble(address.substring(0,address.indexOf(",")).trim()));
 location.setLongitude(Double.parseDouble(address.substring(address.indexOf(",")+1,address.length()).trim()));

For Given Address i need to find location. How to do ?
??


Thanks.

This message and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorised dissemination or copying of this e-mail, and any use or disclosure of any attachments contained in it, is strictly prohibited and may be illegal. If you have received the e-mail in error please notify us on in...@imriel.com or telephone +44 20 8123 0630. Any views expressed by an individual within this e-mail do not necessarily reflect the views of the firm.
IMRIEL LIMITED; Company number 5927583, registered office 81 Oxford Street, London W1D 2EU

Chen Fishbein

unread,
Jan 6, 2014, 2:59:56 AM1/6/14
to codenameone...@googlegroups.com, ru...@imriel.com
Hi,
There is no CodenameOne API for this, you will need to use a geocoding service for this see - http://stackoverflow.com/questions/3652951/google-maps-api-get-coordinates-of-address


Shai Almog

unread,
Jan 6, 2014, 12:16:59 PM1/6/14
to codenameone...@googlegroups.com, ru...@imriel.com
FYI there is also a cn1lib for the google location REST API's: http://www.codenameone.com/cn1libs.html
Reply all
Reply to author
Forward
0 new messages