Ticket #2709 (new bug)

Opened 3 years ago

Renderer setExtent docs are incorrect, returns a boolean

Reported by: bartvde Owned by:
Priority: minor Milestone: 2.13 Release
Component: documentation Version: 2.9
Keywords: Cc:
State:

Description

The docs for setExtent in Renderer.js don't specify that this function can return a boolean to indicate to the layer

    /**
     * Method: setExtent
     * Set the visible part of the layer.
     *
     * Resolution has probably changed, so we nullify the resolution
     * cache (this.resolution) -- this way it will be re-computed when
     * next it is needed.
     * We nullify the resolution cache (this.resolution) if resolutionChanged
     * is set to true - this way it will be re-computed on the next
     * getResolution() request.
     *
     * Parameters:
     * extent - {<OpenLayers.Bounds>}
     * resolutionChanged - {Boolean}
     */

See moveTo in Vector.js:

coordSysUnchanged = this.renderer.setExtent(extent, zoomChanged);

and the docs in the SVG Renderer which do specify this:

    /**
     * Method: setExtent
     *
     * Parameters:
     * extent - {<OpenLayers.Bounds>}
     * resolutionChanged - {Boolean}
     *
     * Returns:
     * {Boolean} true to notify the layer that the new extent does not exceed
     *     the coordinate range, and the features will not need to be redrawn.
     *     False otherwise.
     */
Note: See TracTickets for help on using tickets.