My Goal:
Show a hotel on a map, together with nearby restaurants.

Currently, i have only a table, based on a view with the hotel's node-id as contextual filter. Now i'd like to put all that in a map.

I think with OpenLayers i could show the hotel in one layer, and the restaurants in another. But i'd prefer leaflet for it's size, so i did not try Openlayers yet.

Using geofield, i saw there is a proximity-filed in views. With that, i can show the restaurants and have the proximity in the tooltip, but i can't show the Hotel. My case would be an "abuse" of the proximity field, but i guess there would be more reasonable use-cases, which could use such a feature.

I also thought about how to do a view that contains hotel x and all all referenced restaurants, but i did not find a way yet. Restaurants and Hotels are nodes, with hotels having a multivalue entity-reference field pointing to the recommended restaurants.

1 Answer 1


If you are using geofields you can set up a proximity filter, and in your view filters, add the geofield proximity. In the settings 'source of origin input' try 'other geofield'? Ty mapping the hotels and restaurants using two separate geofields, one for hotels, one for restaurants. Then map the restaurant distance from the hotels as origin>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.