[OpenLayers-Users] pan behaviour for WMS.Untiled

Bill Woodall bwoodall at wardrobe.dhs.org
Tue Mar 20 07:26:49 EDT 2007


Hi Bart,

You didn't mention which version (stable, lastest trunk, ...), but
looking at 2.3 in either MouseDefaults.js or MouseToolbar.js the
function defaultMouseOut just drops the ball so to speak.

A modified 2.3 MouseToolbar could look like;

    /**
    * @param {Event} evt
    */
    defaultMouseOut: function (evt) {
        if (this.mouseDragStart != null
            && OpenLayers.Util.mouseLeft(evt, this.map.div)) {
            switch (this.mode) {
                case "zoombox":
                    this.removeZoomBox();
                    if (this.startViaKeyboard) this.leaveMode();
                    break;
                case "pan":
                    if (this.performedDrag) {
                        this.map.setCenter(this.map.center);
                    }
            }
            this.mouseDragStart = null;
            this.map.div.style.cursor = "default";
        }
    },

and the MouseDefaults;
    /**
    * @param {Event} evt
    */
    defaultMouseOut: function (evt) {
        if (this.mouseDragStart != null &&
            OpenLayers.Util.mouseLeft(evt, this.map.div)) {
            if (this.zoomBox) {
                this.removeZoomBox();
            } else {
                if (this.performedDrag) {
                    this.map.setCenter(this.map.center);
                }
            }
            this.mouseDragStart = null;
        }
    },



.........Bill,

On Tue, 2007-03-20 at 11:02 +0100, Bart van den Eijnden (OSGIS) wrote:
> Hi list,
> 
> when somebody drags outside of the map when panning (WMS.Untiled), part of
> the map stays white and does not update.
> 
> In a tiled situation this does not occur.
> 
> Is this intentional? Does anybody know a quick fix which will cause the map
> to update in this case?
> 
> Thanks in advance.
> 
> Best regards,
> Bart
> 
> --
> Bart van den Eijnden
> OSGIS, Open Source GIS
> http://www.osgis.nl
> 
> 
> 
> 
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users




More information about the Users mailing list