[OpenLayers-Users] RE: using default transparency from service

Andreas Hocevar ahocevar at opengeo.org
Mon Mar 12 06:59:49 EDT 2012


Maybe your WMS is not configured to use alpha transparency with format
image/png. Your configuration would definitely work fine with
GeoServer.

Andreas.

On Mon, Mar 5, 2012 at 8:08 PM, spiveygb <brett.spivey at nc.gov> wrote:
> Andreas,
>
>
>
> Yes. Here is how I’m building the layer:
>
>
>
> lyrName = new OpenLayers.Layer.WMS(
>
>                          layer.title,
>
>                          baseUrl,
>
>                          {
>
>                            layers: layer.name,
>
>                            format: 'image/png',
>
>                            transparent: true
>
>                          },
>
>                          {
>
>                                 isBaseLayer: false,
>
> singleTile: true,
>
>                                  ratio: 1,
>
>                                 transitionEffect: 'resize'
>
>                          }
>
>                     );
>
>
>
> Brett Spivey
>
> NC OneMap Programmer
>
> Center for Geographic Information & Analysis
>
> Office of the State Chief Information Officer
>
> 919.754.6591
>
> [hidden email]
>
> http://www.cgia.state.nc.us
>
>
>
> Email correspondence to and from this address may be subject to the North
> Carolina Public Records Law and may be disclosed to third parties by an
> authorized state official.
>
>
>
> From: Andreas Hocevar-2 [via OSGeo.org] [mailto:ml-node+[hidden email]]
> Sent: Friday, March 02, 2012 9:48 PM
> To: Spivey, Brett
> Subject: Re: using default transparency from service
>
>
>
> Hi,
>
> do you have your WMS layer configured with something like
>
> {layers: "mylayer", transparent: true, format: "image/png"}
>
> Then things should work.
>
> Andreas.
>
> On Wed, Feb 29, 2012 at 9:17 PM, spiveygb <[hidden email]> wrote:
>
>
>> When accessing services from ArcGIS Server, either REST or WMS, the layers
>> are opaque although they have some transparency by default. Is there no
>> way
>> to have the layers draw as intended directly from the service? I know I
>> can
>> set opacity when creating the layer but users can add or access
>> services/layers from many different servers (that aren't mine). In other
>> words, I don't know what services or layers they may add. Therefore, I
>> don't
>> want to "assign" a static transparency value for every one of them by
>> default in the code.
>> ________________________________
>> View this message in context: using default transparency from service
>> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>>
>
>
>
>
> --
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
> ________________________________
>
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://osgeo-org.1560.n6.nabble.com/using-default-transparency-from-service-tp4532730p4541403.html
>
> To unsubscribe from using default transparency from service, click here.
> NAML
>
>
> ________________________________
>
> E-mail correspondence to and from this address may be subject to the North
> Carolina Public Records Law and may be disclosed to third parties by an
> authorized state official.
>
> ________________________________
> View this message in context: RE: using default transparency from service
>
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.


More information about the Users mailing list