[OpenLayers-Dev] zoom slow when overlay vector layer as marker

dequan chen cdqrain at gmail.com
Mon Mar 15 22:39:22 EDT 2010


hi all,
I overlay Vector Layer to the map to monitor vehicles. every 5 second,
update the location. I use vector layer as vehicle marker.

Vehicle.vehicleLayer = new OpenLayers.Layer.Vector("",
        {
            styleMap: new OpenLayers.StyleMap({
                "default": {
                    externalGraphic: "img/v1.gif",
                    graphicWidth: 24,
                    graphicHeight: 12,
                    graphicYOffset: -5,
                    rotation: "${angle}",
                    label: "${vno}",
                    fontSize: "11px",
                    fontColor: "purple",
                    labelAlign: "${align}",
                    fontFamily: "Arial,Verdana",
                }
            })
        });

the problem is, the vector layer contains almost 500 features stand for 500
vehicles. when i zoom the map, the browser can nearly not work. user should
wait 1 or 2 minutes or even more. but when i zoom the district that only
monitor dozens of vehicles, pan or zoom the map will be normal. In the
future, the vehicle number will reach to 1000.
Is there any solution to this problem ? It is very ergent to me. thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20100316/72021596/attachment.html


More information about the Dev mailing list