In the current -dev the bbox filter is only available on nodes. I am building views based on search_api indexes and would like to use the bbox argument.
Attached patch allows me to do that.
| Comment | File | Size | Author |
|---|---|---|---|
| bbox_on_all_views.patch | 603 bytes | batje |
Comments
Comment #1
elamanComment #2
robertwb commentedI'm a +1 on this patch. It is very necessary because any module that creates it's own entity type is unable to use the BBOX portion of this views plugin.
I have tested with my custom entity and this BBOX Contextual Filter becomes available.
Thanks @Elaman -- I changed this to a Bug Report because I think it provides half-broken coverage for non-node Entities.
Comment #3
robertwb commentedA follow-up to this. I *think* the docs state that using this BBOX filter should have an URL in the form:
http://website.com/?q=geojson_viewname/bbox=-78.839,37.722,-78.208,38.277However, this fails on my install, because the query handler seems to forget to trim the "bbox=" off the beginning of the argument, resulting in a join clause in my query like so:
(field_data_geofield.geofield_lon >= 'bbox=-78.839')So, to work properly requires an URL of the form:
http://website.com/?q=geojson_viewname/-78.839,37.722,-78.208,38.277I do not know if this is peculiar to this patch, I can not believe that it is but before I posted a ticket for needing updated docs I thought I'd mention here. it could be that I added the contextual filter in some strange/incorrect way?
If this is in fact a bug that has crept in, the simple fix, of course, would be to check and trim the "bbox=".
Comment #4
polCommitted, thanks !
Comment #6
pol@robertwb: could you open another issue and provide a live example where we can see the problem (or a feature) so I can debug and fix it ?
Thanks
Comment #8
mpgeek commented