Should filtering by proximity to HTML5 location work for anon users if the Access Log is not enabled?

I have it working for Auth users but for some strange reason (possibly BOA) I cannot enable the access log.

So just seeking clarification that this is the issue.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RdeBoer’s picture

Hi Stewart,

Are you referring to Geofield proximity filtering in Views?

It should work for anonymous and authenticated users alike. Check out this demo page, http://regionbound.com/coffee-prices-across-melbourne, and see if the proximities it displays on the right hand side work for you as an anonymous user (you need to set a location first by pressing the "Find me" button or by "teleporting" yourself to an inner city suburb, using the drop-down and textfield).

Proximity in IPGV&M is based on the visitor's location which is stored in the session. The session is unique to each visitor (so there are many sessions for user 0, the anonymous user). Proximity is not related to the accesslog, so you can switch that off, if you are not interested in keeping a record of past visits to your site.

In fact in the very latest 7.x-1.x-dev I've made this a little clearer on the IPGV&M global config page with a new checkbox.

I have heard of BOA, but am not familiar with it. Your description does smell of issues people sometimes have with caching tools. I suggest you read this project page Session Cache API. IPGV&M seamlessly integrates with Session Cache API. If it is enabled, it uses it, otherwise it will use PHP's standard super global $_SESSION.

Hope this helps.

Rik

BarwonHack’s picture

Thanks Rik, Very helpful.
Your demo page works well for me thanks.

Attempting to recreate it, I'm using your latest dev version of IP Views and Maps and have tried it on my local machine and on a BOA server. My experience thus far ...

Observation 1: The Set My Location seems problematic. The block doesn't seem to work on a map generated by views, only on the supplied map block (IPGV&M: Map (Google) centered on visitor's location). The location is always the users geocoded location.
Observation 2: It doesn't seem possible to filter by proximity to HTML5 generated user location. Is this the case? I can sort by proximity and limit results I guess. Admittedly I'm yet to try this with Search_Api_Location (will report back).
Observation 3: The reset button in your demo is not an available option in the Set Location block or the Views Interface.
Observation 4: The regions feature is awesome!

HTML5 Geocoding is not talking to Views very well. Though my location is accurately set on the IPGeoloc Map, the proximity in an attachment is failing.

Notes: I have disabled Smart IP. I'm not using High-performance JavaScript callback handler. I am using Session Cache. I'm using the latest dev version of Geocoder.

RdeBoer’s picture

Hi Stewart,

Thanks for the feedback. I believe we can make observation 1, 2 and 3 work for you. Have to run, but I'll get back to you shortly with some tips.

In the mean time, can I just double-check: for your clustered map are you're using the Geofield module and the Views format "Map (Leaflet API, via IPGV&M)"

Re observation 4: thanks -- took some time and effort to get that right!

Rik

RdeBoer’s picture

Hi Stewart,
I'm back with some more info.

Observation 1: yes, that aspect of the "Set my Location" block works only with Leaflet. If you are using Leaflet already then we have a bug. If not, I suggest you keep the View you have now and simply add Leaflet to the mix. This then opens the door for clustering and all sorts of goodies. And as you can see here, http://regionbound.com/coffee-prices-across-melbourne, Leaflet is just a driver, it does not stop you from displaying Google map tiles -- just enable Leaflet More Maps as well.

The complete module setup to create the best maps is here: http://regionbound.com/Drupal-IPGVM-map-configuration

Observation 2: Yes you can! And http://regionbound.com/coffee-prices-across-melbourne shows exactly that.
Place yourself (that is the black marker) anywhere you like, using "Find me" or "Region" or "Teleport me" (to a landmark, like "Eiffel Tower" or a fully qualified address, like "1 Collins St, Melbourne Australia").
Then the distances shown in the table on the right are with respect to the black marker that you just positioned yourself, using one of the 3 methods. Make sure you configure your Geofield (proximity) field correctly. See screenshot.

Observation 3: It is. It's in the Views UI, see screenshot below. Requires Leaflet.

Re: HTML5 Geocoding is not talking to Views very well. Though my location is accurately set on the IPGeoloc Map, the proximity in an attachment is failing. Probably the same reason as mentioned in observation 2. You need to correctly specify the source of origin on the Geofield.

RdeBoer’s picture

Assigned: Unassigned » RdeBoer
Status: Active » Closed (works as designed)

In the absence of any further comments, I'm Closing this "as works as designed". The key is to use Leaflet and then if Google is required select the desired Google map style via Leaflet More Maps.