Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Openlayers views that set the Format to 'OpenLayers Vector Data Overlay' in the master/default display and don't override this in additional displays through the following errors when the data layer is used as an overlay layer on a map:
Notice: Undefined index: style_options in openlayers_views_openlayers_layers() (line 124 of /openlayers/modules/openlayers_views/openlayers_views.module).
Exception: Projection lacks an authority code. Read http://drupal.org/node/1944074 for hints. in openlayers_get_projection_by_identifier() (line 1066 of /openlayers/openlayers.module).
Proposed resolution
Two options are to either use the default display options if the projection is not set for the current display, or to use the default display options as defaults to complement the current display options.
Temporarily you can override the Format for each display.
Remaining tasks
- Settle on correct fix
- Create patch
- Test
- Commit
Comment | File | Size | Author |
---|---|---|---|
#1 | openlayers-view-display-override-2378725-1.patch | 1.16 KB | jantoine |
Comments
Comment #1
jantoine CreditAttribution: jantoine commentedI was able to implement the first option in the proposed resolutions falling back to the default display options if the current display options don't contain a projection. Patch attached!
Comment #2
PolComment #4
PolThanks !