Closed (fixed)
Project:
Openlayers
Version:
6.x-1.x-dev
Component:
OpenLayers API
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Mar 2010 at 15:44 UTC
Updated:
22 Apr 2010 at 22:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
zzolo commentedThe geometry that this error is saying is undefined is part of the feature object that OpenLayers provides. So, either you are not actually using the right library or somehow your map array is off. Can you post your map array that provides this error?
Comment #2
Anonymous (not verified) commentedWhat do you mean by 'map array'? My maps get their data from Views and as far as I know the only customisations I've made to the maps have been changing the marker icons from the orange circles to taxonomy images...
Comment #3
zzolo commentedThe map array is the array that creates the map. You can use the debugging options in the Settings page to output the map array before and after rendering.
Also, if you are doing some variable styling, please provide any of that code.
Comment #4
Anonymous (not verified) commentedI've attached the map array (from the 'post render' option) and my custom styling is below.
Comment #5
Anonymous (not verified) commentedAny luck deciphering this?
Comment #6
floretan commentedI've had this bug too. The error actually refers to line 133 of openlayers.layers.js :
What happens is that when IE iterates over newFeatureSet, it counts the function indexOf() as an array element, and the code tries to treat that function as a feature, which gives the error above about 'geometry' being invalid (because of course indexOf.geometry doesn't make any sense).
I was able to resolve the problem by wrapping the body of the loop with a check for the type of
newFeatureSet[i]like this:This solves this specific issue, but now I'm running into other errors that are actually located inside of the openlayers library... so I can't close my Windows virtual box yet. I'll post a proper patch when I've got something working.
Credit: I wouldn't have made it so far without firebug lite: http://getfirebug.com/firebuglite
Comment #7
floretan commentedI finally tracked this issue down to a conflict with the ShadowBox plugin (it was adding the "indexOf" function to all arrays), but combined with other issues (xmlns prefix, etc) it made it hard to debug.
Comment #8
tmcw commentedThat's kind of weak, especially when it's clear that they didn't read the jQuery docs. Anyway, I've found it's a better idea to use the full
for(var i = blah; i < blah; i++)in Javascript - the other notation does better with string indexes, but has problems with methods, like this, and is usually slower by about 5 times.Comment #9
zzolo commentedMaybe I am missing something, but this sounds like it is resolved and was actually a problem caused by another module. Closing for now.