Problem/Motivation

I am using Geolocation to display plants on a Leaflet map. Normally plants are well symbolized by points, but if they are many and grow densely it is more suitable to display them as an area. So ideally I would have a field that can take points or polygons, I would like to avoid having two geometry fields on the same node. I saw the field types Geometry and Geometry Collection but there is no drawing functionality for those types. Drawing only seems available for Coordinates and Polygon.
I have also tried using Paragraphs to select the appropriate field type when editing a node but that doesn't work when displaying the map with Views as there a more than one geometry field.

Is there any ambition to support drawing for multi-typed fields in future? I also had a quick look at Geofield and they seem to store all geometries as GeoJson FeatureCollection and drawing for all geometries in one field is possible. I don't mean to compare both projects, but maybe one can learn from each other.

If you see any other solution to this issue I am also happy to hear them.

Comments

janc48 created an issue. See original summary.

janc48’s picture

I solved this issue for me by using paragraphs. I now have one paragraph for each geometry type and display all nodes with Views using a data layer for each geometry type.

christianadamski’s picture

Status: Active » Closed (duplicate)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.