I'm looking to add a simple search box (city name OR postcode in same box), which when entered by a user (including anonymous users) will then pass Geocoded data directly to an Openlayers map (or via a View if needs be) for that location. The map will then show a marker on that spot, and will center the map.
Some of my failed attempts include:
- Global Filters module which will work for Post codes only
- Geocoder Autocomplete module which works well for data entry, but I can't see an easy way to Geocode the result as a node to work with Openlayers.
- HTML5 within Openlayers works well, but I can't see an option for a text form/search box
- Openlayers Proximity (and Openlayers Locator) seems very buggy (and is still in sandbox)
- GeoNames requires a 3rd party subscription (and I'm not sure this would work)
- Getlocations requires Getlocation fields in my nodes: this then doesn't integrate with other fields (eg Addressfield and Geocoder which I'm using elsewhere)
Any thoughts gratefully appreciated! Thanks!
Comments
We implemented this in a D6
We implemented this in a D6 module. We have no date for an upgrade to D7 yet.
http://drupal.org/project/openlayers_geosearch
Something that may help you
I discovered this link while trying to do something similar to what you are attempting. You may find it helpful.
http://www.torontowebsitedeveloper.com/drupal-video-tutorials/creating-d...
IP Geolocation Views and maps + Global Filter
If you're happy for the system to initially determine the visitor's location by itself (using either HTML5-style/GPS-based position retrieval or an IP address lookup), then IP Geolocation Views and maps may be the ticket.
If in addition, you want the visitor to then type a city name have another look at the Global Filter project page. It details something very similar to what you're after in one of its Q&A's.
Any update?
Did you find a solution for this in the end? If you could provide an update on how you did it, that would be great!