[OpenLayers-Users] Loading a GML

Carlos Pinto cmspinto at gmail.com
Thu Mar 27 05:59:40 EDT 2008


Hi all,

I'm loading a GML file that contains a density grid of values.

In firefox it is slow, but the same file in IE takes almost five minutes to
load.
Does anyone have an idea how to make it faster????

The GML contains 1000 polygons that have 10 classes.

To load the file I'm using the code:

            //////// ADD THE LAYER OF THE QUERY \\\\\\\\
            var styleMap = new OpenLayers.StyleMap({fillOpacity: 1});
            var lookup = {
               9: {fillColor: "#ffffff", fillOpacity: 0.5},
               8: {fillColor: "#ffb4b4", fillOpacity: 0.5},
               7: {fillColor: "#ff1e1e", fillOpacity: 0.5},
               6: {fillColor: "#ff9b9b", fillOpacity: 0.5},
               5: {fillColor: "#ffaaaa", fillOpacity: 0.5},
               4: {fillColor: "#ff8282", fillOpacity: 0.5},
               3: {fillColor: "#ff6969", fillOpacity: 0.5},
               2: {fillColor: "#ff5050", fillOpacity: 0.5},
               1: {fillColor: "#ff3737", fillOpacity: 0.5},
               0: {fillColor: "#ff0000", fillOpacity: 0.5}
            };
            styleMap.addUniqueValueRules("default", "type", lookup);
            var mylayer =   new OpenLayers.Layer.GML("GML",
"../KML/simple.xml",{styleMap: styleMap} );
            map.addLayer(mylayer);

Thanks

Carlos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080327/32e625b1/attachment.html


More information about the Users mailing list