darshakshah1988 / gmaps4jsf

Automatically exported from code.google.com/p/gmaps4jsf
0 stars 1 forks source link

Get the map address by provideing a Latitude,Longitude #118

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi All,

I want to get the map address giving the input os lat and long in java 
code level(not in .jsp level). Please help How i can do this.

Public class AddressManager
{
    public void address()
        {
          String address=getMapAddress(strLatitude, strLongitude)
          System.out.printlbn("--------your address---------"+address);
         }
}

Original issue reported on code.google.com by kadiay...@gmail.com on 3 Jun 2010 at 5:03

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
You can do it by using the GMaps4JSF Geocoder service:
PlaceMark placeMark =
GMaps4JSFServiceFactory.getReverseGeocoderService().getPlaceMark(strLatitude,
strLongitude);

The placeMark contains all the data you wish, check the example here:
http://www.mashups4jsf.com/gmaps4jsf-examples/pages/reverseGeocoding.jsf

Original comment by Hazem.sa...@gmail.com on 3 Jun 2010 at 12:35

GoogleCodeExporter commented 8 years ago
Hi Hazemm Saleh,

Thanks for your input.I tryed  the same using follwing code.
PlaceMark  
place=GMaps4JSFServiceFactory.getReverseGeocoderService().getPlaceMark
("12.508513","78.22398");

    System.out.print("-------"+place.getAddress());

And getting follwing execption ,please do the needful help

Exception in thread "main" java.lang.Exception: Error: Connection timed out: 
connect
    at com.googlecode.gmaps4jsf.services.ReverseGeocoderServiceImpl.getPlaceMark
(ReverseGeocoderServiceImpl.java:73)
    at examples.MyProcess.main(MyLocation.java:13);

Original comment by kadiay...@gmail.com on 4 Jun 2010 at 10:19

GoogleCodeExporter commented 8 years ago
please do the needful help

Original comment by kadiay...@gmail.com on 7 Jun 2010 at 8:38

GoogleCodeExporter commented 8 years ago
Checkout your firewall.

Original comment by Hazem.sa...@gmail.com on 9 Jun 2010 at 7:50