Hi Pascal,
I don't see a transparent parameter in your uri. You might try
adding one to see if that helps. Not all wms servers will default to
transparent=true.
For example:
http://www.geocommunicator.gov/wmsconnector/com.esri.wms.Esrimap?Service=WMS
&Version=1.1.1&ServiceName=BLM_BASEMAPS_wms&request=GetMap&layers=blm_admin_
area_boundaries,usfs_forests_boundaries&format=image/png&transparent=TRUE&sr
s=EPSG:4326&bbox=-126,24,-66,50&WIDTH=1000&HEIGHT=433
I have had no problems using layers of <image> elements transparent png in
svg with IE+ASV or Firefox. Svg is actually quite a nice way to interface to
OWS services since svg can easily overlay multiple image elements from
WMS,WCS with vectors from WFS.
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN"
"http://www.w3.org/TR/SVG/DTD/svg10.dtd" >
<svg preserveAspectRatio="xMinYMin" viewBox="-126.0 -50.0 60.0 26.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg" zoomAndPan="magnify">
<g id="canvas">
<rect x="-156.0" y="-80.0" width="240.0" height="240.0" style="fill:none"/>
<g id="WMS0">
<image id="imgNexRad" x="-126.0" y="-50.0" width="60.0" height="26.0"
xlink:href="http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi?Serv
ice=WMS&Version=1.1.1&request=GetMap&layers=nexrad-n0r&forma
t=image/png&transparent=TRUE&srs=EPSG:4326&bbox=-126,24,-66,50&a
mp;WIDTH=1000&HEIGHT=433">
</image>
</g>
<g id="WMS1">
<image id="img2" x="-126.0" y="-50.0" width="60.0" height="26.0"
xlink:href="http://www.geocommunicator.gov/wmsconnector/com.esri.wms.Esrimap
?Service=WMS&Version=1.1.1&ServiceName=BLM_BASEMAPS_wms&request=
GetMap&layers=blm_admin_area_boundaries,usfs_forests_boundaries&form
at=image/png&transparent=TRUE&srs=EPSG:4326&bbox=-126,24,-66,50&
amp;WIDTH=1000&HEIGHT=433">
</image>
</g>
</g>
</svg>
Randy
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
On Behalf Of Barend K ö bben
Sent: Thursday, January 18, 2007 4:01 AM
To: [email protected]
Subject: Re: [svg-developers] WMS into SVG
I think that a SVG UA 'should' be able to display transparent PNG, but
maybe ASV3 does not implement this in an image object. You'll have to
search/google, maybe there are known issues for ASV with PNG. You could
check this with a local PNG that you know has transparency, and load it into
ASV3. Also I think (but I am by no means a PNG expert) that there's several
flavours of PNG, like 24 bit and others.
Did you try getting the image from the WMS as GIF and see if that works...?
On 18-01-2007 10:12, "benoist" <[EMAIL PROTECTED]> wrote:
> Hi Barend,
>
>
>
> I use this url :
>
> var myImageUrl =
>
"http://etat.geneve.ch/wmsconnector/com.esri.wms.Esrimap?Servicename=GeoCada
> stre_IMG";
>
> var version="1.1.1";
>
> var imageFormat="image/png";
>
>
>
> and i am sure the provider use transparency. It can be seen using any
other
> client like mapinfo or ArcGis9.1 for instance.
>
>
>
> And I use ASV3.
>
>
>
> Any idée?
>
>
>
> pascal
>
>
>
> _____
>
> De : [email protected]
[mailto:[EMAIL PROTECTED]
> De la part de Barend K ö bben
> Envoyé : jeudi 18 janvier 2007 08:31
> À : [email protected]
> Objet : Re: [svg-developers] WMS into SVG
>
>
>
> Hi,
>
> Succes for this would depend on:
> - if the WMS indeed serves the PNG transparently. What WMS do you use?
> - if the User Agent (SVG viewer) actually can display the PNG
transparency.
> What UA do you use?
>
> Did you try using another image format, eg GIF?
>
> __
> Barend Köbben
> International Institute for Geo-information
> Sciences and Earth Observation (ITC)
> PO Box 6, 7500AA Enschede (The Netherlands)
> ph: +31 (0)53 4874253; fax: +31 (0)53 4874335
>
> On 17-01-2007 22:28, "benoist" <pascal.benoist11@
> <mailto:pascal.benoist11%40wanadoo.fr> wanadoo.fr> wrote:
>
>> Hello community,
>>
>>
>>
>> I load wms data into my svg server application, through the following :
>>
>> myImageUrl +=
>>
>
"&service=WMS&version="+version+"&request=GetMap&layers="+layerWmsName+"&sty
>> les=&srs=EPSG:" + myMainMap.epsg;
>>
>> myImageUrl += "&BBox=" + myMainMap.curxOrig + "," + (myMainMap.curyOrig +
>> myMainMap.curHeight) * -1 + "," + (myMainMap.curxOrig +
> myMainMap.curWidth)
>> + "," + (myMainMap.curyOrig) * -1;
>>
>> myImageUrl += "&width=" + myMainMap.pixWidth + "&height=" +
>> myMainMap.pixHeight + "&Format=" + imageFormat;
>>
>> myRasterImage.setAttributeNS("http://www.w3.
> <http://www.w3.org/1999/xlink> org/1999/xlink","xlink:href",myI
>> mageUrl);
>>
>>
>>
>> with imageFormat being declared as : "image/png"
>>
>>
>>
>> My problem is that the transparent part of the image is displayed as non
>> transparent white. Would you have any help?
>>
>>
>>
>> Pascal
>>
>>
>>
>> [Non-text portions of this message have been removed]
>>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----
Yahoo! Groups Links
-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/