[OpenLayers-Dev] Format.GeoJSON doesn't load features in IE
Alexandre Dube
adube at mapgears.com
Wed Sep 8 15:25:13 EDT 2010
Hi,
I guess everyone is busy at FOSS4G and I understand that. Since I'm
unable to log on the trac system, here's a patch to fix the following
issue :
With current trunk version, when using OpenLayers.Format.GeoJSON with
a geojson string containing "FeatureCollection", in IE it can't load any
features. See a live example showing the issue [1]. 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 fix [2].
Please, let me know when the trac issue is fixed and I'll open a
ticket for this bug.
[1]
http://dev4.mapgears.com/tests/openlayers-testsgeojson/examples/vector-features.html
[2]
http://dev4.mapgears.com/tests/openlayers-testsgeojson-withfix/examples/vector-features.html
--
Alexandre Dubé
Mapgears
www.mapgears.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-openlayers-r10720-A0.diff
Type: text/x-patch
Size: 715 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20100908/3bab1656/patch-openlayers-r10720-A0.bin
More information about the Dev
mailing list