Upgraded to the most recent dev from 7.x-2.0-beta11 and am now getting these errors:

Undefined index: projection in openlayers_views_style_data->map_features() (line 349 of /sites/all/modules/openlayers/modules/openlayers_views/views/openlayers_views_style_data.inc)

Exception: Projection lacks an authority code. Read http://drupal.org/node/1944074 for hints. in openlayers_get_projection_by_identifier() (line 1066 of /sites/all/modules/openlayers/openlayers.module).

All these issues I've been able to find seem to be from a long time ago and are supposedly already fixed. Not sure why I'm suddenly getting this with 2.x-dev. The only modules I have using Openlayers are Addressfield, Geofield, Geocoder, and OpenLayers Icons Styles.

Most of my maps actually still work. There is just one that is generated using a view that is broken. I've attached both the map export and the view export.

Any help would be greatly appreciated!

Comments

deggertsen’s picture

Issue summary: View changes

Turns out I'm not able to edit any of my maps right now. It returns those errors when I try to edit any of the maps.

joebest’s picture

Got the same issues. It appears that the error occurs if you make View displays multiple locations; single-item Views results appear just fine.

deggertsen’s picture

@joebest, yes I can confirm that. I don't know what's causing the problem though.

joeebel’s picture

Same here. Stymied!

deggertsen’s picture

Yeah, just updated again to most recent dev but I'm still having the same issue despite recent commits. I'm also getting this error. Not sure if they're related.

Notice: Undefined index: style_options in openlayers_views_openlayers_layers() (line 128 of /sites/all/modules/openlayers/modules/openlayers_views/openlayers_views.module).

knalstaaf’s picture

StatusFileSize
new64.94 KB

I encountered this error using the OpenLayers Locator.

The issue was solved after I did the following:

  1. Go to the view of the Open Layers application you're using
  2. Open the settings of the OpenLayers Vector Data Overlay
  3. Change the projection to EPSG:4326

Does this work for you?

deggertsen’s picture

@knalstaaf, I tried that, but unfortunately I still get errors when I try to edit any of my maps and my maps with more than one point aren't working.

Same errors...

Exception: Projection lacks an authority code. Read http://drupal.org/node/1944074 for hints. in openlayers_get_projection_by_identifier() (line 1066 of /sites/all/modules/openlayers/openlayers.module).

Notice: Undefined index: projection in openlayers_views_style_data->map_features() (line 349 of /sites/all/modules/openlayers/modules/openlayers_views/views/openlayers_views_style_data.inc).

csc4’s picture

@knalstaaf thanks - changing Projection in settings seems to have fixed it for me

oana.hulpoi’s picture

Same issue here. Changing projection in view settings doesn't fix it...

milos.kroulik’s picture

Category: Support request » Bug report

Suggestion from #6 worked for me...however, I think this is a bug, because such issue shouldn't happen when upgrading.

One tip: I had to reload page several times (with Ctrl+R) to make the error go away. It might be because of Opcache.

basvredeling’s picture

If you use features: I'd like to add that previously exported views (before 7.x-2.x-beta4) do not add the projection properly to the layer definition. You can edit the view (as in #6) or the exported views layer in /admin/structure/openlayers/layers
Save the projection in either one of those locations and update the feature accordingly.

milos.kroulik’s picture

The problem is related to the commit made to solve https://www.drupal.org/node/2127071.

deggertsen’s picture

@milos.kroulik, do you know how to fix this problem then? Which patches need to be applied or reverted as you suggest in #2127071: Allow different projections in OL Views data overlays. ?

milos.kroulik’s picture

Status: Active » Closed (duplicate)

Please try patch at https://www.drupal.org/node/2127071#comment-9865123

This issue seems to be a duplicate one, now.

basvredeling’s picture

#11 still stands after the applied database update from[#2127071]
If you updated the database the views will have to be re-exported into their feature