Hello,
I'm getting an error with IE7 so the map is not rendering:

Error during map rendering: [object Error]

Using:
- Drupal 7.12
- Geofield 7.x-1.0+7-dev (older releases tryed too)
- OpenLayers 7.x-2.0-beta1+12-dev (older releases tryed too)

The map is in the comments form. I don't know if it matters.

I thought it was an Openlayers issue (like http://drupal.org/node/858450) but if I disable the Geofield options for Behaviors in structure/openlayers/maps everything is fine. No problem with zoom and other options.

No solution founded in other related issues.

I can't post here the URL to see it, but could send it privately. Thank you.

CommentFileSizeAuthor
#4 geofield-behavior-1554990-6333560.patch784 bytesbarthje
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

phayes’s picture

Can you try it in the 2.x-dev version of geofield? We've done some updates to the JavaScript and it *might* be fixed already...

ckrina’s picture

I'm sorry, still having the trouble with 2.x-dev. Even clearing browser and Drupal caches.

barthje’s picture

Component: GeoFied Map » Code

I ran into the same problem.. after some debugging I found out where it goes wrong..

in the file openlayers_behavior_geofield.is it has a loop that wants to make the first letter of a string uppercase.. it seems like IE7 does not support the way it does this.

It goes wrong at line 52:

if (tools && tools.length) {
          for (var i = 0, il = tools.length; i < il; i += 1) {
            // capitalize first letter
            tool = tools[i][0].toUpperCase() + tools[i].slice(1);
            controls.push(
              new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler[tool], {'displayClass': 'olControlDrawFeature' + tool})
            );
          }
        }
barthje’s picture

Version: 7.x-1.0 » 7.x-1.1
Status: Active » Needs review
FileSize
784 bytes

I made a small change to the way javascript gets the first character of the string.. the patch is created for 7.x-1.1

dianacastillo’s picture

I get this : Error found during map rendering: TypeError: Unable to get value of the property 'transform': object is null or undefined

but it has nothing to do with geofield, If I disable geofield options I still get it.

dianacastillo’s picture

I solved my problem by disabling the Adaptive Image Styles module.

drasgardian’s picture

Thank you, the patch from #4 solved my problem.

My specific error message was:

Error during map rendering: TypeError: Unable to get value of the property 'toUpperCase': object is null or undefined

in IE9