[OpenLayers-Users] Empty Base Layer?

Lennox Antoine lxnyce at gmail.com
Mon Jul 19 19:57:49 EDT 2010


When you intialize your map, pass it a "restrictedExtent" so that it will
only show your area of interest. See this example :

http://openlayers.org/dev/examples/restricted-extent.html

Also, it should be possible to use one of your vector layers as a basemap,
rather than creating a layer that does nothing.

Lennox

On Mon, Jul 19, 2010 at 7:36 PM, Mike Purvis <mike at uwmike.com> wrote:

> Well, I'm only displaying blank tiles on that layer, but there are a number
> of items in the vector layer above—I would like to restrict the viewport to
> the region containing these items.
>
> M.
>
>
>
> On Mon, Jul 19, 2010 at 6:04 PM, Lennox Antoine <lxnyce at gmail.com> wrote:
>
>> What effect are you referring to? Why do you care to restrict the bounds
>> of the layer if you're just displaying blank tiles?
>>
>> Lennox
>>
>>
>> On Mon, Jul 19, 2010 at 5:19 PM, Mike Purvis <mike at uwmike.com> wrote:
>>
>>> In both those cases I get global coordinates, though, don't I?
>>>
>>> My Image layer is like so:
>>>
>>>     baseLayer = new OpenLayers.Layer.Image( "Image",
>>>     "/static/img/gridmap.png",
>>>     new OpenLayers.Bounds(0, 0, 3, 3),
>>>     new OpenLayers.Size(600, 600),
>>>     {});
>>>
>>> It's a 600x600 image, and the coordinate system of the map scales that
>>> from 0..3. Is there a straightforward way to get this effect with either of
>>> the two above solutions?
>>>
>>> Thanks.
>>>
>>>
>>>
>>> On Mon, Jul 19, 2010 at 5:10 PM, BMcBride <bmcbride at chacompanies.com>wrote:
>>>
>>>>
>>>> var nobase = new OpenLayers.Layer("No Basemap",{isBaseLayer: true,
>>>> 'displayInLayerSwitcher': true});
>>>>
>>>> -----
>>>> Bryan R. McBride, GISP
>>>> http://www.bryanmcbride.com bryanmcbride.com
>>>> http://geoserving.net/ geoserving.net
>>>> --
>>>> View this message in context:
>>>> http://osgeo-org.1803224.n2.nabble.com/Empty-Base-Layer-tp5314013p5314066.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
>>>>
>>>
>>>
>>>
>>> --
>>> http://uwmike.com
>>>
>>
>>
>
>
> --
> http://uwmike.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100719/ff28e1f3/attachment.html


More information about the Users mailing list