Show a Geofield as a map field from an entity reference

时间:2017-07-12 07:59:00

标签: drupal twig drupal-8

For several days I have been looking for a way to display in a content, field "field_geofield" from other content. To explain, I first have a "lieu" content containing the field Geofield. There is also another "Reunion" content where there is a field of reference to an entity "field_lieu".

I would like to display in my template not a link to "lieu", but the map that is displayed in the "place" content. For the "lieu" content, I have to download the modules and libraries for leaflet which allowed me to display the map correctly.

Nevertheless, when I use this in "Reunion" : {{ node.field_lieu.0.entity.field_geofield.0.value }} The map is not displayed but only the value of the long and the lat (example: POINT(1.080064 49.428707) )

Any idea? Sorry for my approximate English, I am a French student.

Thank you in advance !

0 个答案:

没有答案