I'm a nube to OpenLayers. In trying getting it to work with d7, addressfield, geofield, and geocode, I've got the basic functionality working, but I keep getting warnings when the page renders. The warnings correspond to the behaviors I've selected. I suspect this is a problem with the OpenLayers module in its current 7.x alpha state. Here's an example of the warnings.

•Strict warning: Declaration of openlayers_behavior_dragpan::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_get_class() (line 841 of ...\modules\ctools\includes\plugins.inc).
•Strict warning: Declaration of openlayers_behavior_panzoombar::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_get_class() (line 841 of ...\modules\ctools\includes\plugins.inc).
•Strict warning: Declaration of openlayers_behavior_zoomtolayer::options_form() should be compatible with that of openlayers_behavior::options_form() in ctools_plugin_get_class() (line 841 of ...\modules\ctools\includes\plugins.inc).

Any one with more OpenLayers experience have a sense of what's wrong here?

My environment:
• Drupal core 7.2
• OpenLayers 7.x-2.0-alpha1
• ctools 7.x-1.0-beta1
• Address Field 7.x-1.0-alpha4
• Geocode (from PHayes on github)
• Geofield 7.x-1.0-alpha3

Comments

tvilms’s picture

Removed a misleading comment and posted the actual fix in the next comment.

tvilms’s picture

Scratch my last comment. A few minor edits solved the problem and the warnings went away.

1) In the openlayers.module, the class openlayers_behavior has the "function options_form($defaults = array()) {return array()}"
2) However, the openlayer_behavior_foo.inc files have "function options_form($defaults) {return array()}"
3) I changed the module file to "function options_form($defaults) {return array()}"

steinmb’s picture

Could you make a patch against the dev. release so perhaps one of the maintainers just could commit it? I know it is oneliner but still :)

phayes’s picture

Status:Active» Fixed

This is now fixed in dev.

Thanks

Status:Fixed» Closed (fixed)

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