[OpenLayers-Trac] [OpenLayers] #2826: Format.GeoJSON doesn't load
features in IE when using "FeatureCollection"
OpenLayers
trac-20090302 at openlayers.org
Thu Sep 9 09:15:31 EDT 2010
#2826: Format.GeoJSON doesn't load features in IE when using "FeatureCollection"
----------------------------+-----------------------------------------------
Reporter: adube | Owner: tschaub
Type: bug | Status: new
Priority: major | Milestone: 2.11 Release
Component: Format.GeoJSON | Version: SVN
Keywords: | State:
----------------------------+-----------------------------------------------
When using !OpenLayers.Format.GeoJSON with a geojson string containing
"FeatureCollection", in IE it can't load any features. See a
[http://dev4.mapgears.com/tests/openlayers-testsgeojson/examples/vector-
features.html live example] showing the issue. The json string contains 1
feature. In Firefox, when alerting obj.features.length we get "1" but in
IE we get "2", thus resulting in an error and "null" is returned instead
of the features.
The attached patch resolves the issue. but it's more kinda of a "plaster"
instead of a "remedy" (it's still bleeding, but we don't see it). Any
better solution would be welcomed. See the same example as before with
the [http://dev4.mapgears.com/tests/openlayers-testsgeojson-
withfix/examples/vector-features.html fix].
--
Ticket URL: <http://trac.openlayers.org/ticket/2826>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list