I am getting the following js error as soon as the map tries to load

SCRIPT5007: Unable to get value of the property 'parentNode': object is null or undefined
OpenLayers.js?lw7nik, line 1557 character 178

The map graphics do not show, just a white blank box. The map controls and location node do show.

This only occured in ie and works fine in Firefox.

Comments

nod_’s picture

can you try this patch please : https://drupal.org/node/1364304#comment-5338260

gc23’s picture

Didn't work,
The js error is gone, however the map isn't rendered.
The code indeed enters:

$(window).load(function () {
openlayers.render(map.id);});

nod_’s picture

Well that's a start, Are you using virtual earth layers ? we had problems with thoses. Could you try the default OSM layer ?

gc23’s picture

I am using Google Maps.
So I enabled OSM as well and also removed all markers from the map, I am using views to display markers.
When I activate OSM the map shows fine, for Google Maps it doesn't. I could use OSM but when I enable my markers, IE starts to hang. It took about 1min to render the map with around 1000 markers and also any action taken in the map, zoom in/out etc is also extremely slow.

nod_’s picture

Well 1000 markers is a lot and IE is not the fastest kid on the block either. Have you tried cluster behavior ? You might have some success reducing the number of results you display, 1000 sounds like an awful lot of points to show, is it still usable with that much data ?

If it's still slow with that you might have to consider ditching openlayers and rolling your own map based on gmap and it's cluster behavior. OL, and browsers in general, are still not ready to handle lots of data points the way it's done here.

If you use chrome to display your map is it still dead slow ?

nod_’s picture

If that's a perf issue, it becomes a duplicate of #1370536: Display thousands of entries. I'll leave it open in case the problem is elsewhere.

gc23’s picture

Firefox and Chrome work fine with 1000 markers. It is as fast as when using gmap module. I will try out first OL clustering, in case this works. But yea, if it doesn;t I'm afraid I'll go with the standard gmap module and clustering.

zzolo’s picture

Category: bug » support
Priority: Critical » Normal

Please note that this limitation is with web mapping in general, and switching to GMap may get some more performance, but you will still run into these problems.

The better approach, IMO, is either use something like TileMill to put data into raster format. Or think of a user experience that doesnt show that much data to the user all at one time.

gc23’s picture

Is there a way to load the OSM map for IE and for the rest of the browsers the GMap? I have tried to work some js on load but no luck so far. This could be a nice workaround.

d.sibaud’s picture

Category: support » bug

I have the same problem with only one marker sob!!, tried to apply the #1 patch without results, very big problem:

$items = array();
$openlayers_maps = new stdClass;
$openlayers_maps->disabled = FALSE; /* Edit this to true to make a default openlayers_maps disabled initially */
$openlayers_maps->api_version = 1;
$openlayers_maps->name = 'agencies';
$openlayers_maps->title = 'Angencies Map';
$openlayers_maps->description = 'Map of Catholic Charities NY Agencies';
$openlayers_maps->data = array(
  'width' => 'auto',
  'height' => '400px',
  'image_path' => 'sites/annualreport2011.catholiccharitiesny.org/modules/openlayers/themes/default_dark/img/',
  'css_path' => 'sites/annualreport2011.catholiccharitiesny.org/modules/openlayers/themes/default_dark/style.css',
  'proxy_host' => '',
  'hide_empty_map' => 0,
  'center' => array(
    'initial' => array(
      'centerpoint' => '-73.885092142976, 40.756592141546',
      'zoom' => '11',
    ),
    'restrict' => array(
      'restrictextent' => 0,
      'restrictedExtent' => '',
    ),
  ),
  'behaviors' => array(
    'openlayers_behavior_dragpan' => array(),
    'openlayers_behavior_navigation' => array(
      'zoomWheelEnabled' => 1,
      'zoomBoxEnabled' => 1,
      'documentDrag' => 1,
    ),
    'openlayers_behavior_permalink' => array(
      'anchor' => 1,
    ),
    'openlayers_behavior_popup' => array(
      'layers' => array(
        'agencies_map_openlayers_1' => 'agencies_map_openlayers_1',
      ),
    ),
    'openlayers_behavior_zoompanel' => array(),
  ),
  'default_layer' => 'google_normal',
  'layers' => array(
    'google_normal' => 'google_normal',
    'agencies_map_openlayers_1' => 'agencies_map_openlayers_1',
  ),
  'layer_weight' => array(
    'agencies_map_openlayers_1' => '0',
    'ol_locator_proximity_search_openlayers_1' => '0',
    'openlayers_geojson_picture_this' => '0',
    'geofield_formatter' => '0',
  ),
  'layer_styles' => array(
    'geofield_formatter' => '0',
    'openlayers_geojson_picture_this' => '0',
    'ol_locator_proximity_search_openlayers_1' => 'default_marker_black',
    'agencies_map_openlayers_1' => 'default_marker_black',
  ),
  'layer_styles_select' => array(
    'geofield_formatter' => '0',
    'openlayers_geojson_picture_this' => '0',
    'ol_locator_proximity_search_openlayers_1' => 'default_marker_black',
    'agencies_map_openlayers_1' => 'default_marker_black',
  ),
  'layer_activated' => array(
    'agencies_map_openlayers_1' => 'agencies_map_openlayers_1',
    'geofield_formatter' => 0,
    'openlayers_geojson_picture_this' => 0,
    'ol_locator_proximity_search_openlayers_1' => 0,
  ),
  'layer_switcher' => array(
    'agencies_map_openlayers_1' => 'agencies_map_openlayers_1',
    'geofield_formatter' => 0,
    'openlayers_geojson_picture_this' => 0,
    'ol_locator_proximity_search_openlayers_1' => 0,
  ),
  'projection' => '900913',
  'displayProjection' => '4326',
  'styles' => array(
    'default' => 'default_marker_black',
    'select' => 'default_marker_black',
    'temporary' => 'default_marker_black',
  ),
  'map_name' => 'agencies',
);
$items["agencies"] = $openlayers_maps;
return $items;
d.sibaud’s picture

Category: bug » support

For me was really something stupid, there was in the "default_dark" theme a img/blank.gif white instead of transparent and the top layer was hiding the google map!!! However the patch solved the error message, thanks.
Solved for me, switched to support request.

zzolo’s picture

Status: Active » Closed (duplicate)

Yeah, the blank.gif image thing should have been fixed here: #1364304: Blank Google Map in IE9, but works in FireFox, Chrome etc.

Let me know if this solves your issue. Closing for now.