[MapProxy] California in Africa

Oliver Tonnhofer olt at omniscale.de
Fri Sep 3 02:10:45 EDT 2010


On 02.09.2010, at 18:40, Sebastian E. Ovide wrote:
> You need to tell OpenLayers that this layer is transparent.
> 
> actually it is displayed with opacity 0.5... so it is displayed in top of Google maps but still you can see google maps behind it...  but it draws also a black background (semi transparent)... infact the images that I get from the URL generated by OpenLayers woud be a black box with a piece of CA drawn over it....


You need to tell OpenLayers that this layer is transparent. :)

> http://10.0.1.40:8123/service/?LAYERS=ca_wild_fire&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A900913&BBOX=-13501836.674676,5097432.5405688,-13496944.704867,5102324.5103781&WIDTH=256&HEIGHT=256
> 
> (black tile with part of the map)

Because you/OpenLayers didn't requested that image with transparency. Black is the default background color, you can change it:

http://10.0.1.40:8123/service/?LAYERS=ca_wild_fire&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A900913&BBOX=-13501836.674676,5097432.5405688,-13496944.704867,5102324.5103781&WIDTH=256&HEIGHT=256&BGCOLOR=0xff0000

or you can say that the background should be transparent:

http://10.0.1.40:8123/service/?LAYERS=ca_wild_fire&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A900913&BBOX=-13501836.674676,5097432.5405688,-13496944.704867,5102324.5103781&WIDTH=256&HEIGHT=256&transparent=true

Look at the OpenLayers documentation.

Regards,
Oliver

-- 
Oliver Tonnhofer <olt at omniscale.de>
Omniscale - Dominik Helle, Oliver Tonnhofer GbR
Nadorster Str. 60, 26123 Oldenburg
Tel: +49(0)441/9392774-2 (Fax: 9)



More information about the MapProxy mailing list