Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

How can I achieve Geocoding with the JavaScript OpenLayers API, in the same fashion as the Google Maps API?

share|improve this question
1  
What do you want to geocode? In what language? Do you have an example what you want to achieve....? Did you take a look at: dev.openlayers.org/releases/OpenLayers-2.10/doc/apidocs/files/… –  stUrb May 7 '12 at 20:25
    
i need to get latitude, longitude from the given address, like google geocode... –  Ramesh Kotha May 7 '12 at 20:37
1  
You can still use the Google Geocoding API - if you stay under 2500 reqs per day, it's free to use. You'd have to tie it in with your web application somehow. Is your question really how to do that? If so, we need more context. What do you want to achieve? What do you already have? –  mvexel May 9 '12 at 19:01
1  
Also, there's alternatives that may be just as well suited to your needs: the MapQuest Open geocoder based on OpenStreetMap data, for example. developer.mapquest.com/web/products/open/nominatim –  mvexel May 9 '12 at 19:02
    
Thanks @mvexel, i need to get latitude, longitude from given address for any country, i have done this with google maps api, but i need any free geocoding api, thats why i turned to OpenLayers, but geocoding is not possible with OpenLayers.. –  Ramesh Kotha May 9 '12 at 19:16
show 2 more comments

4 Answers

Openlayers does not feature a Geocoding API. There are several questions here related to geocoding.

share|improve this answer
    
is there any alternative is there? i am using openlayers, so what would be the best possible way? –  Ramesh Kotha May 8 '12 at 17:58
add comment

You can use Google Geocoder with OpenLayers, for an example see this post:

How to use Google Maps V3 Geocode with Openlayers

Disclaimer: as someone pointed out you might be in violation of their usage terms, but I'll leave that for you lawyer to figure out.

share|improve this answer
add comment

Possible way, Try to find any other free/commercial geocoder. Once you geocode the address, still you can you use your openlayer to overlay the lat.longs on the map tiles.

share|improve this answer
    
can u suggest any free geocoder. –  Ramesh Kotha May 9 '12 at 14:43
add comment

http://geocoder.us/help/

"geocoder.us find the latitude & longitude of any US address - for free"

hope you are trying for US addresses...

share|improve this answer
    
thanks for your answer, but i am trying for whole world, is there any thing? –  Ramesh Kotha May 9 '12 at 15:03
add comment

Your Answer

 
discard

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.