Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am developing a webapp using opentripplanner. I have followed 2 and five minute tutorials at their websites, there is also a opentripplaner-geocoder.war webapp, but i am unable to figure out that how can i use this geocoder.

share|improve this question

To work with geocoder in OTP please refer to this post. here

There are some slight improvements to the above post though( I have to spent hours to figure them out!), these are as follows

For Google basemap

  1. In config.js just add these codes after the OSM declaration in baselayers:

     new OpenLayers.Layer.Google(
  2. Add the Google Maps API script tag to index.html in the directory otp-opnlayers-client/src/main/webapp/ (or otp-leaflet-client/src/main/webapp/ depending on version):

    <script src=""></script>

For Google Geocoder

  1. In config.js set enabled : true or (depending on version) add the following block to the otp.config variable:

    geocoders : [
                name: "Geocoder",
                className: "otp.core.Geocoder",
                url: "/otp-geocoder/geocode",
                addressParam: "address",
  2. In application-context.xml, under otp-geocoder/scr/main/resources/org/opentripplanner/geocoder/, change the value of ref of the geocoderServer bean to geocoderGoogle:

    <bean id="geocoderServer" class="">
            <property name="geocoder" ref="geocoderGoogle" />
  3. Build and restart the server. Then try http://localhost:8080/otp-geocoder/geocode/?address=18.516446,73.851751.

P.S. - I'm working on a latest version of opentripplanner i.e. SNAPSHOT 0.9

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.