I am looking for a way to show the origin-point defined on a geofiled proximity-field on the map.

I thought that would be a quite common requirement for many use- cases, but aparently it's not, as the feature is not there.

My own case is, to show a hotel (origin) with recommended restaurants nearby.
I have a hotel-nodetype that has an entityreference-field which lists the restaurant-nodetype.

Comments

sirtet’s picture

I found 2 other issues that somehow seem to touch my need to display more than one type of content on the same map:

#2164929: Allow more than one lat/lon field per View states there is a way to do what i want, but i can't get it to work.
#1941264: Allow a second field to contain lat/long coords for mapping is basically the same, if i interpret those two issues correctly. But here it is postponed, so i guess they are not the same...

PS:
Also the project-page mentions the ability to show different node-types on one map,

...allowing multiple content types to be displayed on the same map...

But i found no docs or examples about that.

rdeboer’s picture

Assigned: Unassigned » rdeboer
Status: Active » Fixed

Looks like you are after two things at the same time.
Both are available in 7.x-1.x-dev, soon to become 7.x-1.26.

The first appears to be the setting and showing as a marker the center of all proximity calculations. This is done with the "Set my location" block, where you can type a partial address and the visitor marker will be located there, with all distances calculated by Geofield relative to that point.

The second is supporting multiple content types that have different fields to store lat/lon. One may use a Geofield, another may use Location. Or both may use Geofield, but for historic reasons they don't share the same Geofield machine name. This is supported by the multi-select box on the map view config panel: https://www.drupal.org/files/issues/Screen%20Shot%202014-08-30%20at%208....

Rik

sirtet’s picture

Thanks.
Yes, show visitor comes close.

But my use-case is a bit different, i try to show a hotel (NID via contextual filter), which references nearby restaurants (other nodetype with same geofield).
More details: drupal.stackexchange.com/questions/127874/geofield-and-leaflet-maps-how-to-show-proximity-originator-on-map

I have seen the visitor option, and it made me think it could be nice if one coul show other types of originator on the map too, which are "manually set in the view", or "taken from another field" (would be my case).

The different fields took a while until i understood the purpose. A good feature, but won't help me, my fields are already the same machine name.
I think i would need a UNION- query over my hotel-node and the restaurants, which are referenced from the hotel. But i think that can't be done in the UI.

I managed to get my result in openlayers with 2 data-layers, but still would love to get it via leaflet... showing the proximity-source would do that.

sirtet’s picture

Thanks.
Yes, show visitor comes close.

But my use-case is a bit different, i try to show a hotel (NID via contextual filter), which references nearby restaurants (other nodetype with same geofield).
More details: drupal.stackexchange.com/questions/127874/geofield-and-leaflet-maps-how-to-show-proximity-originator-on-map

I have seen the visitor option, and it made me think it could be nice if one coul show other types of originator on the map too, which are "manually set in the view", or "taken from another field" (would be my case).

The different fields took a while until i understood the purpose. A good feature, but won't help me, my fields are already the same machine name.
I think i would need a UNION- query over my hotel-node and the restaurants, which are referenced from the hotel. But i think that can't be done in the UI.

I managed to get my result in openlayers with 2 data-layers, but still would love to get it via leaflet... showing the proximity-source would do that.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.