After having upgraded to 7.x-2.x-dev I get the following error on a page that displays a map.
Notice: Undefined index: map_name in theme_openlayers_map() (line 15 of /sites/all/modules/openlayers/includes/openlayers.theme.inc).
The map does display.
Thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | map_name-1144542-3.patch | 518 bytes | pontus_nilsson |
Comments
Comment #1
Jerome F commentedSo do I
Comment #2
yli_ektor commentedMe to
Comment #3
pontus_nilssonThe array $args looks like this
map->map_name
map->other stuff
presetname
but right now map_name is adressed as if it was directly under $args.
This patch adresses map_name under $map in the array.
Comment #4
manu manuThanks pontus_nilsson,
patch in #3 solved my issue, and I'm able to see map points now.
Edit: Finaly it seems to move the problem elsewhere: I had a undefined index error on admin/build/openlayers/maps/my_map/edit until I reverted the patch...
Comment #5
pontus_nilssonManu manu, I noticed the same. Anyone knows what the correct structure is, from what I understand there is some restructure work going on with openlayers that this module needs to implement.
Comment #6
zzolo commentedThere is some restructure work going on. It should be correct the current way it is in the 7.x-dev version. You can look at the openlayers_render_map_data() function.
Are you upgrading from 6.x or starting new?
Comment #7
bjalford commentedI get this message using latest 7 dev version on clean install using a geofield field.
Comment #8
seanberto commentedI'm getting this error with GeoField and OLs too (running latest dev releases of each).
Looks like the $map_name variable isn't being set @ line 211 in openlayers.module:
If $map is an array, no value for $map_name is passed to openlayers_render_map_data().
Comment #9
muschpusch commented#3 fixes the notice!
Comment #10
avr commentedThis is actually an issue wit Geofield. I've created a patch here: http://drupal.org/node/1171000#comment-4525924
Comment #11
Jerome F commentedpatch pointed in #10 works
Comment #12
zzolo commentedThank you for the patch. This should be all fixed in current dev.