GithubHelp home page GithubHelp logo

geocoder-java's People

Contributors

igals avatar panchmp avatar

Watchers

 avatar

geocoder-java's Issues

Release ver 0.16

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


Please use labels and text to provide additional information.


Original issue reported on code.google.com by panchmp on 30 Apr 2014 at 10:43

Using http client 4.1

Just a suggestion in using apache client 4.1. I haven't tested this throughly 
yet, b/c I can't use your request method on google app engine. I'm setting up a 
URL Fetcher to do the json request. 

public GeocodeResponse geocode(final GeocoderRequest geocoderRequest) {

    String url = null;
    try {
      url = getURL(geocoderRequest);
    } catch (UnsupportedEncodingException e1) {
      e1.printStackTrace();
    }

    if (url == null) {
      System.err.println("Geocoder.geocode(GeocoderRequest): Error url null");
      return null;
    }

    HttpClient client = new DefaultHttpClient();
    client.getParams().setParameter(CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_1);
    HttpGet post = new HttpGet(url);

    //debug
    System.out.println("executing request " + post.getRequestLine());

    HttpResponse response = null;
    try {
      response = client.execute(post);
    } catch (ClientProtocolException e) {
      e.printStackTrace();
    } catch (IOException e) {
      e.printStackTrace();
    }
    HttpEntity resEntity = response.getEntity();

    String json = "";
    if (resEntity != null) {
      try {
        json = EntityUtils.toString(resEntity); // this has a limit, but is one way to do it.
      } catch (ParseException e) {
        e.printStackTrace();
      } catch (IOException e) {
        e.printStackTrace();
      }
    }

    client.getConnectionManager().shutdown();

    final Gson gson = new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create();

    return gson.fromJson(json, GeocodeResponse.class);
  }

Thanks for the library. 
Brandon Donnelson
http://gwt-examples.googlecode.com

Original issue reported on code.google.com by [email protected] on 6 Feb 2011 at 8:01

Add support for HttpProxy

What steps will reproduce the problem?
1. using the library behind a proxy you'll get an java.net.ConnectException: 
Connection timed out: connect
2.
3.

What is the expected output? What do you see instead?
I expect the library to work behind a proxy

What version of the product are you using? On what operating system?
0.15 (happens on all platforms)

Please provide any additional information below.
com.google.code.geocoder.Geocoder.request(Gson gson, String urlString) doesn't 
include a proxy when opening the stream on the URL. 

It should include a java.net.Proxy.NO_PROXY unless some properties are given in 
order to set up the proxy (maybe another Geocoder constructor receiving a Proxy 
instance).

You can use System-wide properties to mitigate the issue, (-Dhttp.proxyHost 
etc.), but sometimes those cannot be changed

cfr. with http://stackoverflow.com/a/1433296

Original issue reported on code.google.com by [email protected] on 4 Oct 2013 at 10:43

compilation error while building v3 using maven

What steps will reproduce the problem?
1.project copied and extracted to E:\Work\geocoder-java
2.Maven downloaded and added to Path system variable
3.inside E:\Work\geocoder-java directory when mvn install commnad is given, 
attached error is happening :

What is the expected output? What do you see instead?
Compilation is not happening.

What version of the product are you using? On what operating system?
Geocoder-java V3 and OS : Windows XP service pack 2. Java: jdk.1.5.17

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 8 Mar 2012 at 6:53

Attachments:

Getting wrong lat lng values for Kia Dealer addresses for kia.com

What steps will reproduce the problem?
1. Followed the same way as explained in Google Map API Premier at 
http://code.google.com/p/geocoder-java/

2. The address Strings passed are 
    a. 2145 Hwy 50 West Pueblo CO 81007
    b. 1111 Southgate Drive Windsor CO 80550
    c. 223 Broad Street, Route 72 Bristol CT  06010
    d. 3000 Ih 35 South Waco TX 76706
    e. 3363 Ih 35 South New Braunfels TX 78132
    f. 12115 Ih 35 North San Antonio TX 78233
    g. 4221 I-10 East Baytown TX 77521


What is the expected output? What do you see instead?
Compare the values with MapQuest values which are correct mentioned in the 
attached Excel sheet.

What version of the product are you using? On what operating system?
0.15 Windows 7 or Linux

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 23 Aug 2013 at 5:44

Attachments:

Add support for components

Google allows a components parameter to the geocoding queries. I've attached a 
patch that gives the possibility to use it.

Please let me know how you find this implementation or if you would like me to 
change it.

Original issue reported on code.google.com by [email protected] on 31 Aug 2012 at 6:21

Attachments:

Problems Getting Lat and Lng

I only want to get Lat and Lng so I do this:

What steps will reproduce the problem?
1. Declare a Class GeoAddressService and LatLng variable
2. Assign the value geoAddressService.getLatLngPointsByAddress("Paris, France") 
to the LatLng variable

What is the expected output? What do you see instead?
I expect to receive the Lat and Lng from the address but instead I receive a 
NullPointerException in the line 32

What version of the product are you using? On what operating system?
Is the 0.15 version

Please provide any additional information below.
When I only use the geocoder.geocode(geocoderRequest); method it works fine but 
then I use the getLatLngPointsByAddress method and it throws me a exception.

Original issue reported on code.google.com by [email protected] on 11 Jun 2013 at 12:35

Exception thrown by Code when only zipcode is set in request instead of address or location

I am trying to get latitude and longitude with only zip codes. I encountered 
following issue and created a temporary fix for it.

What steps will reproduce the problem?
1. In geocoder request don't pass address or location
2. Set Postal code component and language only
2.1 Java code throws exception with this code
GeocoderRequest geocoderRequest = new 
GeocoderRequestBuilder().addComponent(GeocoderComponent.POSTAL_CODE, 
'31421').setLanguage("en").getGeocoderRequest();

Exception is: "Address or location must be defined"

2.2 Whereas google api allows it
https://maps.googleapis.com/maps/api/geocode/json?components=postal_code:31421

What is the expected output? What do you see instead?
APi request should be parsed as valid request and google api should be called. 
I got exception "Address or location must be defined"

What version of the product are you using? On what operating system?
0.16

Please provide any additional information below.
I have override the Geocoder.getURLQuery method, not to throw exception when 
address or location both are not present. It should ideally check if not even 
one address component is there then exception should occur

Original issue reported on code.google.com by [email protected] on 6 Jul 2014 at 12:25

Using this with Google App Engine (GAE)

You can't use apache http commons 3.1 client with GAE. Do you have a version 
that works on GAE, b/c I can't seem to get it to work with out modifying your 
source.

My use:
Geocoder.setConnectionManager(new SimpleHttpConnectionManager());
    Geocoder geocoder = new Geocoder();
    GeocoderRequest geocoderRequest = new GeocoderRequestBuilder().setAddress(geocode).setLanguage("en").getGeocoderRequest();
    GeocodeResponse geocoderResponse = geocoder.geocode(geocoderRequest);

Exception thrown:
java.lang.NoClassDefFoundError: java.net.Socket is a restricted class. Please 
see the Google  App Engine developer's guide for more details.
    at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)
    at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
    at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
    at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
    at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
    at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
    at com.google.code.geocoder.Geocoder.geocode(Geocoder.java:51)
    at com.gonevertical.server.db.Db_Feed_Geocode.geocode(Db_Feed_Geocode.java:89)
    at com.gonevertical.server.db.Db_Feed_Geocode.geocodeForThing(Db_Feed_Geocode.java:72)
    at com.gonevertical.server.db.Db_Feed_Spreadsheet.processGeocode(Db_Feed_Spreadsheet.java:890)
    at com.gonevertical.server.db.Db_Feed_Spreadsheet.geocodeColumn(Db_Feed_Spreadsheet.java:815)
    at com.gonevertical.server.db.Db_Spreadsheet.geocodeColumn_FromTask(Db_Spreadsheet.java:50)
    at com.gonevertical.server.servlet.Servlet_Task.startGeocoding(Servlet_Task.java:339)
    at com.gonevertical.server.servlet.Servlet_Task.doGet(Servlet_Task.java:86)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
    at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:35)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:58)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java:97)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
    at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:351)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
    at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

Brandon Donnelson
http://gwt-examples.googlecode.com

Original issue reported on code.google.com by [email protected] on 30 Jul 2011 at 5:42

Remove dependency to commons-lang-2.6 or upgrade to 3

It looks like only StringUtils.isNotEmpty() from that dependency is used. 

There is a 3.1 version of the library dependency already. 

Adding geocoder-java as a dependency to a project using 3.1 version of commons 
lang adds commons-lang-2.6 to the projects class path which makes it prone for 
prone for the developer to use commons-lang-2.6 classes rather than 
commons-lang-3.x (because of IDEs auto import feature)

Original issue reported on code.google.com by [email protected] on 9 Mar 2013 at 4:20

Can this code be used without Google maps

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.
Can this code be used without Google maps


Original issue reported on code.google.com by [email protected] on 5 Mar 2014 at 10:12

Download missing

What steps will reproduce the problem?
1. Since we don't use maven in our company we need a way to download the jar 
files

What is the expected output? What do you see instead?
Files in the "Downloads" section of the Google code project

What version of the product are you using? On what operating system?
Trying to use the latest version on Windows/Java


Original issue reported on code.google.com by TheChrisPratt on 20 Feb 2013 at 8:32

Not a bug:How can I integrate GeoCoder without maven?

Hi!

I've stumbled over your project yesterday and would like to use it, but 
everytime I try to hit my servlet page, there's a 500:

HTTP ERROR 500
Problem accessing /debug_output. Reason:
    org/apache/commons/httpclient/HttpConnectionManager

Caused by:
java.lang.NoClassDefFoundError: 
org/apache/commons/httpclient/HttpConnectionManager
...

The following libs are included in the WEB-INF directory:
(not all for Geocoder since my project uses jsoup and runs on appengine)
apache-mime4j-0.6.jar
appengine-api-1.0-sdk-1.4.0.jar
appengine-api-labs-1.4.0.jar
appengine-jsr107cache-1.4.0.jar
commons-codec-1.3.jar
commons-logging-1.1.1.jar
datanucleus-appengine-1.0.8.final.jar
datanucleus-core-1.1.5.jar
datanucleus-jpa-1.1.5.jar
geocoder-java-0.6-SNAPSHOT.jar
geronimo-jpa_3.0_spec-1.1.1.jar
geronimo-jta_1.1_spec-1.1.1.jar
httpclient-4.0.3.jar
httpcore-4.1.jar
httpcore-nio-4.1.jar
httpmime-4.0.3.jar
jackson-core-lgpl-1.6.4.jar
jackson-mapper-lgpl-1.6.4.jar
jdo2-api-2.3-eb.jar
jsoup-1.4.1_from_source.jar
jsr107cache-1.1.jar

The error occurs right on my development machine (not deployed on appengine)

Which libs do I need?

Original issue reported on code.google.com by [email protected] on 2 Jan 2011 at 2:10

Using http client 4.1

Just a suggestion in using apache client 4.1. I haven't tested this throughly 
yet, b/c I can't use your request method on google app engine. I'm setting up a 
URL Fetcher to do the json request. 

public GeocodeResponse geocode(final GeocoderRequest geocoderRequest) {

    String url = null;
    try {
      url = getURL(geocoderRequest);
    } catch (UnsupportedEncodingException e1) {
      e1.printStackTrace();
    }

    if (url == null) {
      System.err.println("Geocoder.geocode(GeocoderRequest): Error url null");
      return null;
    }

    HttpClient client = new DefaultHttpClient();
    client.getParams().setParameter(CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_1);
    HttpGet post = new HttpGet(url);

    //debug
    System.out.println("executing request " + post.getRequestLine());

    HttpResponse response = null;
    try {
      response = client.execute(post);
    } catch (ClientProtocolException e) {
      e.printStackTrace();
    } catch (IOException e) {
      e.printStackTrace();
    }
    HttpEntity resEntity = response.getEntity();

    String json = "";
    if (resEntity != null) {
      try {
        json = EntityUtils.toString(resEntity); // this has a limit, but is one way to do it.
      } catch (ParseException e) {
        e.printStackTrace();
      } catch (IOException e) {
        e.printStackTrace();
      }
    }

    client.getConnectionManager().shutdown();

    final Gson gson = new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create();

    return gson.fromJson(json, GeocodeResponse.class);
  }

Thanks for the library. 
Brandon Donnelson
http://gwt-examples.googlecode.com

Original issue reported on code.google.com by [email protected] on 6 Feb 2011 at 8:01

  • Merged into: #2

Use timeouts

None of the geocoder implementations seem to define timeout values. That's bad 
in a production system. Here's an implementation that attempts to define as 
many useful timeouts as possible:

/**
 * @author Antti Koivisto
 */
public class TimeoutSafeGeoCoder extends Geocoder {

    private static final int HTTP_CLIENT_CONNECTION_TIMEOUT = 5 * 1000;  // 5 seconds
    private static final int HTTP_CLIENT_METHOD_TIMEOUT = 5 * 1000; // 5 seconds
    private static final int HTTP_CLIENT_MAX_CONNECTIONS = 200;
    private static final int DEFAULT_URL_CONNECTION_TIMEOUT = 60 * 1000; // 60 seconds

    private final HttpClient httpClient;

    /**
     * Use given connectionTimeout as HttpConnectionManagerParams.setConnectionTimeout();
     * @param connectionTimeout
     */
    public TimeoutSafeGeoCoder(int connectionTimeout) {
        httpClient = setupHttpClient(connectionTimeout);
    }
    public TimeoutSafeGeoCoder() {
        httpClient = setupHttpClient(DEFAULT_URL_CONNECTION_TIMEOUT);
    }
    public TimeoutSafeGeoCoder(final String clientId, final String clientKey) throws InvalidKeyException {
        super(clientId, clientKey);
        httpClient = setupHttpClient(DEFAULT_URL_CONNECTION_TIMEOUT);
    }

    private HttpClient setupHttpClient(int connectionTimeout) {
        // As mapHandler may be used from several threads simultaneously, we must use HttpClient in
        // thread-safe way (see http://hc.apache.org/httpclient-3.x/threading.html)
        HttpConnectionManagerParams cmParams = new HttpConnectionManagerParams();
        // maxConnectionsPerHost and maxTotalConnections must be set here, as the default values
        // are not suitable for this use. As the FonectaMapHandler only connects to one host, we
        // can use same number in both.
        cmParams.setDefaultMaxConnectionsPerHost(HTTP_CLIENT_MAX_CONNECTIONS);
        cmParams.setMaxTotalConnections(HTTP_CLIENT_MAX_CONNECTIONS);
        cmParams.setConnectionTimeout(connectionTimeout);
        MultiThreadedHttpConnectionManager connectionManager = new MultiThreadedHttpConnectionManager();
        connectionManager.setParams(cmParams);
        return new HttpClient(connectionManager);
    }


    protected GeocodeResponse request(Gson gson, String urlString) throws IOException {
        final GetMethod getMethod = new GetMethod(urlString);
        try {
            getMethod.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(3, false));
            getMethod.getParams().setParameter(HttpMethodParams.SO_TIMEOUT, new Integer(HTTP_CLIENT_METHOD_TIMEOUT));

            httpClient.executeMethod(getMethod);

            final Reader reader = new InputStreamReader(getMethod.getResponseBodyAsStream(), getMethod.getResponseCharSet());
            return gson.fromJson(reader, GeocodeResponse.class);
        } finally {
            getMethod.releaseConnection();
        }
    }
}

Original issue reported on code.google.com by [email protected] on 29 Apr 2014 at 12:08

GAE example not working. Method Geocoder.setConnectionManager(..) not available

What steps will reproduce the problem?
1. Copy/Paste code from GAE sample

What is the expected output? What do you see instead?
Expect the setConnectionManager method to be available. Instead method is not 
available. When running on GAE with this, I get a GPS OVER_QUERY_LIMIT result.

What version of the product are you using? On what operating system?
0.15

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 31 Oct 2013 at 11:49

Upgrade to Maven 3.x

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


Please use labels and text to provide additional information.


Original issue reported on code.google.com by panchmp on 13 Jun 2011 at 7:10

AdvancedGeoCoder with Client/key

What steps will reproduce the problem?
I would like to use AdvancedGeoCoder with Proxy and Client/key together.
Therefor need new AdvancedGeoCoder ("clientId","clientKey");

What is the expected output? What do you see instead?
Could you please give latest jar with new new AdvancedGeoCoder 
("clientId","clientKey");

What version of the product are you using? On what operating system?
Windows

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 22 Apr 2013 at 10:33

Support of "partial_match" property

Please support "partial_match" property of result element. See sample response:

{
  "status": "OK",
  "results": [ {
    "types": [ "street_address" ],
    "formatted_address": "Цветной бул., 25, город Москва, Россия, 127051",
    "address_components": [ {
      "long_name": "25",
      "short_name": "25",
      "types": [ "street_address" ]
    }, {
      "long_name": "Цветной бул.",
      "short_name": "Цветной бул.",
      "types": [ "route" ]
    }, {
      "long_name": "Тверской",
      "short_name": "Тверской",
      "types": [ "sublocality", "political" ]
    }, {
      "long_name": "город Москва",
      "short_name": "город Москва",
      "types": [ "locality", "political" ]
    }, {
      "long_name": "АО Центральный",
      "short_name": "АО Центральный",
      "types": [ "administrative_area_level_2", "political" ]
    }, {
      "long_name": "Москва",
      "short_name": "Москва",
      "types": [ "administrative_area_level_1", "political" ]
    }, {
      "long_name": "Россия",
      "short_name": "RU",
      "types": [ "country", "political" ]
    }, {
      "long_name": "127051",
      "short_name": "127051",
      "types": [ "postal_code" ]
    } ],
    "geometry": {
      "location": {
        "lat": 55.7728858,
        "lng": 37.6206937
      },
      "location_type": "ROOFTOP",
      "viewport": {
        "southwest": {
          "lat": 55.7697382,
          "lng": 37.6175461
        },
        "northeast": {
          "lat": 55.7760334,
          "lng": 37.6238413
        }
      }
    },
    "partial_match": true
  } ]
}

Original issue reported on code.google.com by [email protected] on 21 Mar 2011 at 2:36

API Key support

I've added API key support to be able to use it with the API console.

Simply use: <geocoder_instance>.setApiKey(yourkey);

Feel free to use it.

Original issue reported on code.google.com by [email protected] on 4 Jun 2014 at 4:49

Attachments:

Impossible to get the "postcode_localities" when a postal code search matches many cities

What steps will reproduce the problem?
1. use the following uri 
http://maps.googleapis.com/maps/api/geocode/json?address=57100+FR&sensor=false 
2. the line "  "postcode_localities" : [ "Manom", "Thionville" ]," is not found 
in the java result


What is the expected output? What do you see instead?

Add a field to get this information


What version of the product are you using? On what operating system?

the last one

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 8 Jan 2014 at 4:52

Missing bounds in GeocoderGeometry

The API documentation 
(https://developers.google.com/maps/documentation/geocoding/#Results) states 
that the geometry can contain:
* location
* location_type
* viewport
* bounds

But the Object model (GeocoderGeometry) does not contain the "bounds" member.

An example of a response that includes "bounds":
http://maps.googleapis.com/maps/api/geocode/json?address=17200%20FM3005%20Galves
ton,%20TX%2077554&sensor=false

Original issue reported on code.google.com by [email protected] on 21 Nov 2012 at 7:43

Add the channel

Could you please add support for the channel parameter, as is shown here: 
https://developers.google.com/maps/documentation/business/guide#AppUsage


Original issue reported on code.google.com by [email protected] on 23 Apr 2013 at 11:29

Upgrade JBoss repository

more info
http://community.jboss.org/wiki/MavenGettingStarted

Original issue reported on code.google.com by panchmp on 13 Jun 2011 at 7:50

Not working on Heroku

I am using version 0.9 of the library for geocoding addresses inside my web 
application. When I am using on my local environment, things are working fine 
but when I deploy the application on Heroku, it doesn't decode.

Are there some known issues or different ways of initializing the library ?

Original issue reported on code.google.com by [email protected] on 27 Feb 2012 at 12:48

Add dependencies list to Project Home

Please specify this library dependencies on the project home and where/how to 
obtain them. It's really annoying, not to mention the time wasted, to try to 
figure it out going through the errors.

For who is having the same problem, this library requires the following JAR 
dependencies:

* Googe GSON
Download: https://code.google.com/p/google-gson/downloads/list
Download it. JAR file, source and Javadoc JAR will be included in it. Just add 
to your project like any other JAR.

* Apache Commons Logging:
Download: http://commons.apache.org/proper/commons-logging/download_logging.cgi
Get the binaries file, JAR file, source and Javadoc JAR will be included in it. 
Just add to your project like any other JAR.

Original issue reported on code.google.com by bruno.finger12 on 12 Jun 2013 at 4:51

No support for simple API key

https://developers.google.com/maps/documentation/geocoding/?csw=1#api_key

Should be as simple as adding "key" param and sending over HTTPS.

Original issue reported on code.google.com by [email protected] on 3 Jun 2014 at 3:12

java.lang.RuntimePermission modifyThreadGroup on app engine

I could swear it was working before, but I had commented out my call to geocode 
because I was worried about going over my quota on geocode calls.  Now the code 
is back in and on app engine I'm getting this error:

[testappzzy/1.349848961219651097].<stdout>: ERROR: [pool-4-thread-1] 
com.google.code.geocoder.Geocoder.geocode.54: 
java.security.AccessControlException: access denied 
(java.lang.RuntimePermission modifyThreadGroup)

I'm wondering if it's caused by line 29, in geocoder

private static final HttpClient HTTP_CLIENT = new HttpClient(new 
MultiThreadedHttpConnectionManager());

I.e., is there a single threaded http connection manager you could use instead?

Original issue reported on code.google.com by [email protected] on 20 Apr 2011 at 4:39

Documentation missing

I think there is documentation missing.

Any documentation may help this project's users, like JavaDoc, Tutorials / 
Getting Started Guides, Wiki.

Thanks in advance.

Original issue reported on code.google.com by [email protected] on 30 Jan 2012 at 10:56

Exception for connectivity issues too vague.

*What steps will reproduce the problem?
1. Remove Internet Connectivity
2. Attempt to invoke com.google.code.geocoder.Geocoder.geocode(...)

*What is the expected output? What do you see instead?
There is a stack trace for the java.net.UnknownHostException that is dumped to 
the console.  However, at the level of my code where I am calling the 
geocode(...) method, the only exception I am able to catch is a 
java.lang.NullPointerException.  This makes it difficult to handle the issue 
gracefully since NPE is such a generic error. At that level, it could be 
connectivity, or any number of other things.  

I would like to be able to advise my user of the lack of connectivity, so it 
can be remedied. It would also be handy to provide them the domain which 
accompanies the UnknownHostException (in this case, maps.googleapis.com) 
dynamically. At this point, I had to hard code info that into my catch 
statement of the NullPointerException.

*What version of the product are you using? On what operating system?
I am using geocoder-1.0.0.jar on Windows XP / Eclipse Helios / JRE 6.0

*Please provide any additional information below.
None, but if more information is needed, I can provide it.

Original issue reported on code.google.com by [email protected] on 26 Apr 2013 at 4:02

The method getHttpClient() is undefined for the type Geocoder.

What steps will reproduce the problem?
(Copied from the project home, and tried with version: 0.9 and 0.11)
final Geocoder geocoder = new Geocoder();
geocoder.getHttpClient().getHostConfiguration().setProxy("proxy.example.com", 
8080);
GeocoderRequest geocoderRequest = new 
GeocoderRequestBuilder().setAddress("Paris, 
France").setLanguage("en").getGeocoderRequest();
GeocodeResponse geocoderResponse = geocoder.geocode(geocoderRequest);

What is the expected output? What do you see instead?
Generates an error at compile time: The method getHttpClient() is undefined for 
the type Geocoder. 

What version of the product are you using? On what operating system?
Both geocoder-java-0.9 and 0.11 on a Debian server


Original issue reported on code.google.com by [email protected] on 29 Sep 2012 at 7:46

Version with plain URLConnection doen't respect response encoding.

What steps will reproduce the problem?
1. Set java default encoding not UTF-8, i.e. file.encoding=Cp1251
2. Make request with language = "ru"

As result response fields are in invalid encoding.

What version of the product are you using? On what operating system?

version 0.9

Please provide any additional information below.

You can use java.net.URLConnection#getContentEncoding when creating 
InputStreamReader.

Original issue reported on code.google.com by [email protected] on 6 Feb 2012 at 7:53

Format of Formatted Address is different in Geocoder-java API


Team,

I am using Geocoder-java API but i am getting formatted Address key name in 
different format what we get from direct call from broswer by using link.

Use below link to check format of Formatted Address 

Link : 
http://maps.googleapis.com/maps/api/geocode/json?address=hazen&sensor=true

We are getting formatted Address key as "formatted_address" but while using 
geocoder-java API version 0.12 we are getting formatted Address key as 
"formattedAddress" which is different. So please check it.



Expected Output : formatted_address

Current OUTPUT  : formattedAddress


Version : 0.12

OS : Windows XP

Thank you 

Sandeep Kumar Soni


Original issue reported on code.google.com by [email protected] on 13 Feb 2013 at 12:18

Add support of google Google Maps API Premier user

Requests to Maps API web services by Maps API Premier applications require 
digital signatures using a cryptographic key we provide to you for that 
purpose. The signing process combines a URL and a signing key together using an 
encryption algorithm, creating a unique signature.

Example
http://code.google.com/intl/uk/apis/maps/documentation/webservices/#JavaSignatur
eExample

Original issue reported on code.google.com by panchmp on 28 Jun 2011 at 7:44

Push to Maven central

It would be great to use this jar from maven central 
http://search.maven.org/#browse

Original issue reported on code.google.com by [email protected] on 19 Oct 2011 at 11:15

java.net.UnknownHostException: maps.googleapis.com

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.

Tried the Simple Usage example but getting below exception:
java.net.UnknownHostException: maps.googleapis.com

Original issue reported on code.google.com by [email protected] on 5 Mar 2014 at 10:11

build failure

What steps will reproduce the problem?
1. >svn co http://geocoder-java.googlecode.com/svn/trunk/ geocoder-java
2. >cd geocoder-java
3. >[INFO] --- maven-gpg-plugin:1.4:sign (sign-artifacts) @ geocoder-java ---
GPG Passphrase: ???

What is the expected output? What do you see instead?
*gpg: error loading `iconv.dll': The specified module could not be found.

What version of the product are you using? On what operating system?
Apache Maven 3.0.4 (r1232337; 2012-01-17 10:44:56+0200)
Maven home: C:\programs\maven\bin\..
Java version: 1.6.0_25, vendor: Sun Microsystems Inc.
Java home: C:\Program Files (x86)\Java\jdk1.6.0_25\jre
Default locale: uk_UA, platform encoding: Cp1251
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"

Please provide any additional information below.


What is GPG Passphrase?
Why is there dependency to "iconv.dll"?

Original issue reported on code.google.com by [email protected] on 10 Sep 2012 at 10:39

Google maps URL conflicts with Weblogic security

What steps will reproduce the problem?
1. On WebLogic server 10.35

2. Use Google Business license, clientId & clientKey
   //Used following constructor
   Geocoder gglGeoCoder = new Geocoder(gglClientId, gglClientKey);

   //In request method url.openStream() gives Security Exception
   protected GeocodeResponse request(Gson gson, String urlString){}

   Though generated urlString is good and opens JSON object in the browser.

   Error is like :
   <Apr 10, 2014 9:33:22 PM EDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=KEYNECTIS ROOT CA,OU=ROOT,O=KEYNECTIS,C=FR". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
<Apr 10, 2014 9:33:22 PM EDT> <Notice> <Security> <BEA-090898> <Ignoring the 
trusted CA certificate "CN=GeoTrust Primary Certification Authority - G3,OU=(c) 
2008 GeoTrust Inc. - For authorized use only,O=GeoTrust Inc.,C=US". The loading 
of the trusted certificate list raised a certificate parsing exception PKIX: 
Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
<Apr 10, 2014 9:33:22 PM EDT> <Warning> <Security> <BEA-090504> <Certificate 
chain received from maps.googleapis.com - 74.125.196.95 failed hostname 
verification check. Certificate contained *.googleapis.com but check expected 
maps.googleapis.com>

It seems there is some conflict with Weblogic digital security. 

3. a- This whole thing works fine if I execute this as stand alone   
application (from main method). It gives security Error only when running on 
Weblogic server with Google license. 
b- Same application works good on Weblogic also if we don't use clientId and 
clientKey (like Geocoder gglGeoCoder = new Geocoder();)

Expected output should be GSON object without this security error. 

Geocoder-java version 0.15 with jdk1.6.0_17 is being used on windows 7 (32bit) 
and on Linux.


I think this API is doing its job very correctly but there is some security 
conflict coming from Weblogic when 
URL url = new URL(urlString);
url.openStream(urlString); //Security Error comes here

Please let me know if you came across before or already know how to bypass
this security conflict on weblogic server.

Thanks a ton

Original issue reported on code.google.com by [email protected] on 11 Apr 2014 at 11:34

Don't print the message stack-trace, instead throw it.

What steps will reproduce the problem?
1.Call geocoder.geocode(geocoderRequest) with invalid request.
2.
3.

What is the expected output? What do you see instead?
I see exception stack trace and null is returned. I want to have the exception 
thrown at me.

What version of the product are you using? On what operating system?
latest - 0.15

Please provide any additional information below.

Geocoder.class line 60:

        } catch (Exception e) {
            logger.error(e.getMessage(), e);
            return null;
        }

Why are you printing the stacktrace??? You are a library - you should throw the 
exception and let the users that use the library decide what to do with it!!! 
Now I have a test-case that tests with an invalid parameter and every time I 
run it I see a huuge stacktrace in the command line (instead of specifying an 
expected parameter on the test).

Original issue reported on code.google.com by [email protected] on 3 Feb 2014 at 11:23

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.