[OpenLayers-Dev] Null basemap?

Dan Little danlittle at yahoo.com
Wed Dec 12 16:10:20 EST 2007


I've used the MapServer Untiled Layer-type and have had it use the blank-image url as the URL to mapserver.  I've found this useful for doing some debugging as it always gives me a nice clean reference to the mapsize and mapext in the URL. :-)

----- Original Message ----
From: Tim Schaub <tschaub at openplans.org>
To: dev at openlayers.org
Sent: Monday, December 10, 2007 3:43:50 PM
Subject: Re: [OpenLayers-Dev] Null basemap?


Jeff Yutzler wrote:
> In the past we've always been told that you must have a basemap to
 use 
> OpenLayers.  "So many things are keyed off of the base map, it must
 be 
> there or things just won't work."  However, I find this to be an
 awkward 
> constraint, particularly if you have an OGC context that you are 
> loading.  OGC contexts have no knowledge of the concept of base map -
 
> everything is just a layer and the "basemap" is naturally the bottom 
> layer of the context.  To get around this, I developed a dummy "Null"
 
> basemap class that always returns blank.gif.  Is this an acceptable 
> solution to the problem?  If so, would this be a worthwhile
 ticket/patch 
> to provide?

I agree that it is an awkward constraint.  My issue is more with the 
coupling of map.baseLayer and the layer.isBaseLayer property.

Ideally, we'd have a map.displaySRS or something.  Without this
 property 
set however, it is nice to have the map draw projection related 
information from somewhere.  The map.baseLayer currently serves that 
purpose.  The weird part (in my mind) is also having a
 layer.isBaseLayer 
property.  What we really want to know is "can this layer be displayed 
in a different SRS?"  The layer.isBaseLayer property sort of means "no"
 
in response to this question - but it is a bit too broad.

My workarounds have been about making layers[0] act as a base layer.
  If 
you want a dummy layer to serve this purpose, there are a bunch of 
options without patching the trunk.  An image layer with displayInLayer
 
false sounds like an easy one to me.

I do like the idea of working towards a more flexible handling of the 
base layer concept.

Tim

> 
> 
> !DSPAM:4033,475da7b1165291961014482!
> 
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
> 
> 
> !DSPAM:4033,475da7b1165291961014482!

_______________________________________________
Dev mailing list
Dev at openlayers.org
http://openlayers.org/mailman/listinfo/dev






      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20071212/6a9b48e3/attachment.html


More information about the Dev mailing list