This discussion is archived
4 Replies Latest reply: Jan 17, 2013 5:20 AM by 985226 RSS

ADF mobile GeoCode Converter

985226 Newbie
Currently Being Moderated
Hi,

I am new to oracle ADF. In Oracle ADF mobile library how to find country and state from longitude and latitude.

In android we can achieve this functionality by using the below code. I am looking how we can achieve the same functionality using ADF library.

          ArrayList<Address>      addresses = (ArrayList<Address>) new Geocoder(context,
                         Locale.getDefault()).getFromLocation(
                         Double.parseDouble(longitude),
                         Double.parseDouble(latitude), 1);

Regards,
Hamesh
  • 1. Re: ADF mobile GeoCode Converter
    Kamaal,SaifKamaal Explorer
    Currently Being Moderated
    Chk this : http://docs.oracle.com/cd/E25054_01/web.1111/b31973/dv_map.htm

    Always mention the Jdev version
  • 2. Re: ADF mobile GeoCode Converter
    985226 Newbie
    Currently Being Moderated
    Hi,
    This URL provide the MAP. I required the list of Address for a particular latitude and longitude.
    I will be helpful if i will get a sample code.

    I am using JDEVADF_11.1.2.3.0.
  • 3. Re: ADF mobile GeoCode Converter
    Joe Huang Journeyer
    Currently Being Moderated
    Hi,

    One way is to use Google - Google has a Geo-coding REST service that you can leverage that returns address based on lat/longitude. What you would do is to treat it like a JSON data service (there is a new blog article on blogs.oracle.com/mobile on consuming JSON data services). In other word, create a URL connection to the Google Geolocation service. You would then need to write Java code to call the Google Geolocation service by using RESTServiceAdapter APIs. You can pass in the lat/longitude to the Google Geolocation JSON API, and it would return you an address.

    Let us know if this is not sufficient - we will try to create a sample if needed.

    Thanks,

    Joe Huang
  • 4. Re: ADF mobile GeoCode Converter
    985226 Newbie
    Currently Being Moderated
    Hi Joe ,
    Thank you very much for your quick reply.

    I am new to ADF . It will be very much helpful if you can provide me a sample code for this.As a beginner its tough time for me to get this functionality.

    Also please confirm we have to use the below Geo-coding REST service for this?

    http://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=false


    Regards,
    Hamesh

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points