[OpenLayers-Users] Multiple invoke by zoom, very bad performance

bartvde at osgis.nl bartvde at osgis.nl
Fri Feb 19 09:07:12 EST 2010


Does this happen with normal zoom or with the mousewheel zoom?

If with the mousehweel zoom, check the new options (in OL trunk) for the
MouseWheel handler:

    /**
     * Property: interval
     * {Integer} In order to increase server performance, an interval (in
     *     milliseconds) can be set to reduce the number of up/down events
     *     called. If set, a new up/down event will not be set until the
     *     interval has passed.
     *     Defaults to 0, meaning no interval.
     */
    interval: 0,

    /**
     * Property: delta
     * {Integer} When interval is set, delta collects the mousewheel z-deltas
     *     of the events that occur within the interval.
     *      See also the cumulative option
     */
    delta: 0,

    /**
     * Property: cumulative
     * {Boolean} When interval is set: true to collect all the mousewheel
     *     z-deltas, false to only record the delta direction (positive or
     *     negative)
     */
    cumulative: true,

Best regards,
Bart

>
> Hi Marc, thank you very much for your attention.
>
> The test is very simple:
>
> in jsp: invke the map throughout servlet:
>
> map = new OpenLayers.Map( 'map' );
>                 layer = new OpenLayers.Layer.WMS(
>                 "SampleWMS",
>                 "OpenlayerZoomMultipleInvoke",//invoke the serlvlet
>                 {layers: 'sea_ice_concentration_02'},
>                 {singleTile: true}
>
> int the servlet: I catch the parameter (getParameter layer, bbxo, etc...)
> and load the rul, for example:
>
> url = server + request.getParameter("BBOX") + ....; and print a message:
>
> System.out.println("invoke the map");
>
> The message is print 2^n times (n = #zoom), ie: zoom=2 => message print 4
> times...zoom=4=>16 times...
>
> Thanks, Marck
> --
> View this message in context:
> http://n2.nabble.com/Multiple-invoke-by-zoom-very-bad-performance-tp4595600p4597953.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>





More information about the Users mailing list