[OpenLayers-Dev] 2.5 RC3

Christopher Schmidt crschmidt at metacarta.com
Sat Sep 29 11:44:44 EDT 2007


On Thu, Sep 27, 2007 at 06:53:07PM -0600, Linda Rawson wrote:
> The following are things that I would like added and I don't have time to
> research if they are going to make it in the future release so I will just
> tell you.

Linda,

Thanks for the feedback -- I've sent this on to the dev list, for
further discussion there. (I'm still coming out of conference mode, so I
don't have the time to meaningfully respond to your requests at the
moment.) 

-- Chris

> In map.js
> 
>     /**
>     * @param {String} name
>     *
>     * @returns The Layer with the corresponding name from the map's
>     *           layer collection, or null if not found.
>     * @type OpenLayers.Layer
>     */
>    getLayerByName: function(name) {
>        var foundLayer = null;
>        for (var i = 0; i < this.layers.length; i++) {
>            var layer = this.layers[i];
>            if (layer.name == name) {
>                foundLayer = layer;
>            }
>        }
>        return foundLayer;
>    },
> 
> In util.js
> 
> OpenLayers.Util.onImageLoadError = function() {
>     this._attempts = (this._attempts) ? (this._attempts + 1) : 1;
>     if(this._attempts <= OpenLayers.IMAGE_RELOAD_ATTEMPTS) {
>         this.src = this.src;
>     } else {
>         this.style.backgroundColor = OpenLayers.Util.onImageLoadErrorColor;
>         this.src = "imgs/blank.gif";
>     }
>     this.style.display = "";
> };
> 
> panel.js
> 
>                 if (this.controls[i].active) {
>                     element.className = this.controls[i].displayClass +
> "ItemActive";
>                 } else {
>                     element.className = this.controls[i].displayClass +
> "ItemInactive";
>                 }
>                 if (this.controls[i].hidden) {
>                     element.style.display = "none";
>                 } else {
>                     element.style.display = "inline";
>                 }
>             OpenLayers.Event.observe(controls[i].panel_div, "mousedown",
>                 OpenLayers.Function.bindAsEventListener(
> OpenLayers.Event.stop));
>             OpenLayers.Event.observe(controls[i].panel_div, "mouseup",
>                 OpenLayers.Function.bindAsEventListener(
> OpenLayers.Event.stop));
> 
> 
> 
>     hide: function(controlName) {
>         for (var i = 0; i < this.controls.length; i++) {
>             var cName = "OpenLayers.Control." + controlName;
>             if (this.controls[i].CLASS_NAME == cName) {
>                 this.controls[i].hidden = true;
>             }
>         }
>         if (this.map) { // map.addControl() has already been called on the
> panel
>           this.redraw();
>         }
>     },
> 
>     show: function(controlName) {
>         for (var i = 0; i < this.controls.length; i++) {
>             var cName = "OpenLayers.Control." + controlName;
>             if (this.controls[i].CLASS_NAME == cName) {
>                 this.controls[i].hidden = false;
>             }
>         }
>         if (this.map) { // map.addControl() has already been called on the
> panel
>           this.redraw();
>         }
>     },
> Thanks,
> Linda Rawson
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On 9/26/07, Erik Uzureau <erik.uzureau at metacarta.com> wrote:
> >
> > you can maybe try setting maxResolution to "auto", that should do it?
> > erik
> >
> > On 9/25/07, Linda Rawson <linda.rawson at gmail.com> wrote:
> > > I have a legacy mapping system that I am trying to convert to
> > openlayers.
> > > MG.  It is bad.
> > >
> > > Anyway, I have the following dimensions of a 600 X 600 window.
> > >
> > >
> > > var bounds = new OpenLayers.Bounds(-122.1655, 42.9507, -122.1077, 43.008
> > );
> > >
> > > I need the four lat/lon corners to be exactly these numbers at a certain
> > > zoom level.  What would I set as the resolution in the resolution array
> > to
> > > get this?
> > >
> > > My resolution array is the following:
> > >
> > > var layerResolutions =
> > > [0.703125,0.17578125,0.0439453125,0.0054931640625,0.0006866455078125,
> > 0.000171661376953125,0.0000858306884765625,0.00004291534423828125,
> > 0.000021457672119140625,0.000010728836059570312];
> > >
> > > Thanks in advance,
> > >
> > > Linda Rawson
> > > _______________________________________________
> > > Users mailing list
> > > Users at openlayers.org
> > > http://openlayers.org/mailman/listinfo/users
> > >
> > >
> >

-- 
Christopher Schmidt
MetaCarta



More information about the Dev mailing list