Posted by tmcw on February 12, 2010 at 3:38pm
| Project: | OpenLayers |
| Version: | 6.x-2.x-dev |
| Component: | OpenLayers Views |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (works as designed) |
Issue Summary
It is a commonly-requested feature to be able to just query the nodes within a certain square or circle from a given point. This should, most likely, be built as a plugin to the OpenLayers Data display and be able to work efficiently enough to be the backend for dynamic content loading. Similar code has been written for the KML module that's currently in process of being committed, and I know that Bryn is working on this a bit.
Comments
#1
Subscribing.
#2
I'm now co-maintaining the KML module, so a views-based version is coming soon in the 2.x branch, which will include arguments for bbox.
#3
I think supporting plugins ro communications for this is good, but I don't think actually creating this logic in views is something that should be int he scope of this module. Views should be handling the filtering. You probably realize this, but I just wanted to clarify.
#4
What do you mean? We'd be writing a simple views query plugin which let us do radius-from-a-point, something that views would obviously not support natively. Possibly there is something that does this in Location/Geo etc.
#5
The functionality is not well supported in Location, it's only really possible through a number of user-submitted patches but it's been nearly 2 months since anything has been committed. See http://drupal.org/node/662892#comment-2724256 which was posted yesterday for a broad discussion on these issues, however those patches are beginning to blur the line between radius-from-a-point (good OpenLayers functionality) and radius-from-a-post-code (beyond OL scope?). There's also http://drupal.org/node/606342#comment-2618980 which deals only in radius-from-a-point querying in a views argument handler.
I haven't played a lot with Geo, however http://drupal.org/node/654488 indicates that there may be some limited radius-from-a-point querying in in there.
#6
Wow.. that's a mess.
#7
There's a fairly complex but useful requirement in here somewhere about enabling proximity search by postcode and displaying the results on a map. This is one of the most commonly used features on websites that have a list of locations on them. I suspect the 'proper' answer should involve a geocoding module that creates an exposed Views filter, geocodes user input and passes the data on to OpenLayers for the map display, but no geocoding module does this. For me at least it's a major plus point for Location that this feature is available, and a dealbreaker for Geo / Geocode and OpenLayers that I can't seem to find anything that works similarly with them.
#8
Scratch that, I've finally figured out how to get geocoding working in exposed Views filters using Geo. Now all I need to do is get it to default to UK and I'm golden...
#9
Hi Daniel, did you manage to find a solution?
I want to be able to do a UK postcode proximity search and display the results on a map, but everything I have tried so far hasn't worked.
#10
So I think it's better to work on solutions for working with other projects (apachesolr_views, etc) than to put something in OL core. Setting as by design.
#11
Hello everybody, I've been working on a module called Openlayers Proximity (http://github.com/ademarco/openlayers_proximity) which does pretty much what discussed in this issue: it exposes Views filters and arguments to perform proximity based searches. The user is asked to input the name of the location from where to start the search and its radius (in kilometers, miles, etc...): Openlayers Proximity will obtain lat/lon of the specified location using Openlayers Geocoder APIs.
In order to work properly, after installing the module, is necessary to build the proximity index table by visiting admin/build/openlayers/proximity. This has to be done only the first time: it will index all existing nodes, while, for newly created nodes, the module will automatically take care of that.
In the future I'm planning to integrate it with the Rules module in order to perform actions based on nodes proximity, for example: notify an user when a node is created near his location. An integration with the Faceted Search module would also be great.
The module is still in heavy development and I'm planning a release as soon as it will be more stable, in the meanwhile I'd love to hear your feedback. Have a look to the screenshots for a quick overview of the module's behavior and configuration.
Thanks!
Antonio