I use the Geofield module to store location information with a node and display the nodes on a map using the Openlayers module. When the map is displayed the following notice is thrown twice for each node:
Notice: Undefined index: format in geofield_field_formatter_view() (line 71 of /var/www/.../htdocs/sites/default/modules/contrib/geofield/geofield.formatters.inc).
I use the Openlayers map widget and the node information comes from a view that outputs the Geofield value using the WKT Formatter and Full geometry data option.
The error is in the following line:
if ($display['settings']['format'] == 'degrees_minutes_seconds') {
Apparantly the format index is not always set so you either have to always set it or first check if the index exists before checking the value?
Comments
Comment #1
marty2081 commentedOh, and there is a typo on line 139:
'decimal_degrees' => t('Decimal degress'),Comment #2
phayes commentedCommitted:
http://drupalcode.org/project/geofield.git/commit/9dced85
http://drupalcode.org/project/geofield.git/commit/dc01672
I haven't tested these, can you please test and report back?
Comment #3
marty2081 commentedHi Patrick,
Thanks for the fast reply. The notices and typo are corrected.
I do get a new Notice now, but I'll open a new issue for that.
Comment #4
phayes commentedThanks
Comment #5
avdp commentedSmall typo in code:
if (isset($dispay['settings']['format'])) {
) at the end