geolocation_views: show combined data in tooltip I have two content types that work together:


"place": a place on a map (via a geolocation field)
"object": an object that is in a specific "place" (referenced via an entityreference field)


Several "objects" can be stored in the same "place".

Now I want to display a map showing the location of each object (via geolocation_views).

My problem:


either the view shows OBJECTS, but then if there are several objects in the same place, several "pins" will appear on the exact same spot on the map, which doesn't work well (you can only click on the topmost pin)
or the view shows PLACES, but then the information about what object is stored in that place is absent.


For now, I have the following:


the main view is the map and shows places
and then I added a second view, as an attachment next to the map; this view lists (textually) all objects, grouped by places.


This works, but it means that the map is pretty much useless: you can click on a place, see its name, but you have no information about the objects and so you have to search the name of this place in the second view and then you will see the objects. Since there are several dozen of places, it's really cumbersome.

Ideally, I'd like that when the user clicks on a "place" on the map, the tooltip shows not only the name and address of the place (it's already the case), but also the list of objects stored in that place.

How can I achieve that?
You're incredibly close. What you need to do is incorporate the objects related to the place into the place view itself.

You do this by means of a Relationship. You can find that, when you're editing the view, in the right-hand Advanced column. When you click Add, you'll see something like Entity Reference: Referenced Entity, A bridge to the Content entity that is referenced via your relate field.

This puts the JOIN in the FROM clause of the underlying SQL query.