Hi Guys
Drupal 7
Geofield 7.x-2.3
I am attempting to create a page view that will display a list of "restaurants" nodes near to a "beach" node.
I have content types called “beach” and “restaurant” setup and a “geofield” field added to both.
Content has been created for both types and the geofield data populated.
I have created the view and added the proximity contextual filter. The problem I have is that the URL for any content that I have created does not append the long/lat data to it.
It only displays the node info. E.g /node/1
Not:
/node/1/lon,lat
How do I get the longitude and latitude data to append to the URL.
If I manually append the long/lat info to the url in the browser the geofield proximity contextual filter works great.
Any info would be appreciated
Cheers

Comments

gge’s picture

You could have a look at IP Geolocation Views & Maps.

timwilde’s picture

Thanks for the reply gge,

It appears that IP Geolocation Views & Maps has the same problem. i.e for a contextual filter to work it needs to pass the long/lat co-ordinates in the URL. I cannot see any other way to get a node contextual filter to work

Any pointers would be appreciated

Thanks

gge’s picture

For sure having lat/long in the URL is not be the only way to get this working.

With IP Geolocation Views & Maps "A fallback may be entered above under Provide default value as either a Fixed value or as PHP Code." You can use php and to set the reference point that geofield from "beach" node.
Also try a proximity filter (not contextual). I see some interesting options like "Source of Origin Point".

I'm not an expert but my advice is to spend more time with IPGV&M.