Map is not rendering in IE. This is the error I get:
Error during map rendering: [object Error]
The map did render for a while afetr installing the module, only the full-screen link was having trouble. However, now the map will not show up at all in IE.

CommentFileSizeAuthor
#4 mid_firefox.png176.15 KBjmcl
#4 mid_ie.png42.52 KBjmcl

Comments

tmcw’s picture

Check that your OpenLayers source isn't set to /dev, but to /api.

jmcl’s picture

I downloaded the Openlayers source and am accessing the source through:
sites/all/modules/openlayers/OpenLayers-2.9.1/OpenLayers.js

tmcw’s picture

Is there an online example of this breaking? Many other things (like conflicts with other modules) can trigger breakage on IE.

jmcl’s picture

StatusFileSize
new42.52 KB
new176.15 KB

At the moment the site is in development behind a firewall. However, I have attached images that hopefully will explain better what is going on.

tmcw’s picture

Sorry, it's simply impossible to debug errors on IE without seeing the error directly. Very often this error is caused by trailing commas in object notation, like

var object = {
fa: test,
la: test,
trailing_comma: trailing,
}

versus

var object = {
fa: test,
la: test,
trailing_comma: trailing
}

Check out any custom code for this problem, and try an IE console of some kind, but there's not much I can do.

jmcl’s picture

IE for some reason randomly started working again. No clue why. Thanks for all your help.

tmcw’s picture

Status: Active » Closed (fixed)

Er, okay - closing.

BenjaminG’s picture

Status: Closed (fixed) » Needs review

Hiya,

I am developing a small local Government dashboard (http://www.thinkmakeshow.com/event) using feeds and rendering a map layer a'la managing news. I'm not doing term extraction or anything sexy, just the basics of showing objects on a map using open layers to present my data and location (or two lat lon cck fields) to store my data. I have an issue and a question!

Issue first. I can't seem to get the map rendering in ie6. It seems to render in ie7 and ie8 but in ie6 I'm getting a "Error during map rendering: [object Error]" error. I have:
- tried compressing my CSS stylesheets in recognition of the 31 stylesheets issue
- tried compressing my javascript
- tried removing the block widgets making javascript calls on page load
- tried removing jquery_ui (currently powering my date picker only)

And so far no joy.

Now the question. I've read through module development thread and I can see that the GEO module is desupported in version 2 of openlayers. I also sense it is unlikely to make it back in until it is stable. I would like to be able to plot our priority 1 gritting routes on to this map. I can do that visually through the open layers CCK WKT field but it is a bit clunky. I can see that the WKT field is defining co-ordinates at each click and drawing a straight vector line between the two points. I have the route information in a traditional DBF, SHP and DBX file format. Opening that up I can see that co-ordinates exist. My question is - is there anything out there that is open source that will help me convert those traditional GIS files into a WKT linestring?

Thanks for listening and I have absolutely fallen in love with the Drupal openlayers module. Good luck with the development and I'll be helping out where I can.

BenjaminG’s picture

Version: 6.x-2.0-alpha8 » 6.x-2.0-alpha9
tmcw’s picture

Status: Needs review » Closed (fixed)

Relative to the IE problem: update to alpha10 or the -dev version of OpenLayers. There was a bug in the virtualearth layer that was fixed after alpha9, and which is visible on your site.

Relative to getting linestrings on this map: you can try using the Spatial Module to import shapefiles as WKT. This is what I recommend if you have to do this, but not recommended for the following reasons:

* Importing shapefiles into Drupal tends to give you a single entity with lots of features, or tons of entities which are hard to manage
* Representing linestrings as WKT and embedding in a document will, at the very least, double pagesize and thus reduce loading speed
* Rendering linestrings on a map in IE, or even in older Firefox, is a sure-shot method to making the map very, very slow to render initially and respond to interaction.

So, either set up a tileserver (TileLite, TileCache, GeoServer, etc) to provide the tiles, or render them once and put them on S3 or in your site, but avoid vectors in the browser unless you can guarantee that your userbase is all using fast browsers and good hardware.

BenjaminG’s picture

Thanks very much for that. I thought I was using the latest alpha but I'll definitely update to the latest dev.

There is so much to learn about that sometimes I feel like my brain will collapse into ooze. Thanks for the recommendation on using a tileserver - I'll do my best to work it out. It's funny because actually these people have a really excellent spatial oracle database storing all of this information but it looks like cat sick when you serve it up to the internet,

BenjaminG’s picture

I can confirm that I have _Alpha10 installed. Will update to the latest dev version.

chicagomom’s picture

Version: 6.x-2.0-alpha9 » 6.x-2.0-beta1
Component: OpenLayers API » OL API
Status: Closed (fixed) » Active

I am using OpenLayers 6.x-2.0-beta1 and am still experiencing this error in IE 7 [Error during map rendering: Object Error] when viewing an OpenStreetMap with multiple points. A map with a single point renders ok.

chicagomom’s picture

I have discovered that in OpenLayers Presets | Behaviors enabling "Zoom to location" was the source of this error. Unchecking zoom to location enabled the map to display in IE7.

zzolo’s picture

Status: Active » Closed (cannot reproduce)

Hi @chicagomom. Were you ever able to figure out what the actual error was? Re-open if you need to.

romiomon’s picture

After activating the CSS optimization in admin/settings/performance everything is working just fine in IE.

romiomon’s picture

After activating the CSS optimization in admin/settings/performance everything is working just fine in IE.