<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<br>Hi,<br><br>I have only one wms layer and is a single tile. I would like to make it user friendly.<br><br>Want to have a button called 'generate bitmap' or similar.<br><br>That zip up the bitmap and send it to the user so they can view at a later stage.<br><br>Thanks.<br><br><hr id="stopSpelling">From: arnd.wippermann@web.de<br>To: kwonghu@hotmail.com<br>Subject: AW: [OpenLayers-Users] FW:  Download image(bitmap)<br>Date: Sat, 18 Apr 2009 16:33:51 +0200<br><br>




<style>
.ExternalClass .EC_hmmessage P
{padding-right:0px;padding-left:0px;padding-bottom:0px;padding-top:0px;}
.ExternalClass BODY.EC_hmmessage
{font-size:10pt;font-family:Verdana;}
</style>



<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_890521414-18042009">Hi,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_890521414-18042009"></span></font>&nbsp;</div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_890521414-18042009">if it's only one wms layer and singleTiled, then the 
easiest way should be to use right click on the map and save 
image.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_890521414-18042009"></span></font>&nbsp;</div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_890521414-18042009">if it's not singleTiled you can try something like 
this:</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_890521414-18042009"></span></font>&nbsp;</div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_890521414-18042009">var wmsRequest=yourWMS.getFullRequestString() + 
"&amp;BBOX=" + yourWMS.getExtent().toBBOX() + "&amp;WIDTH=" + map.getSize().w + 
"&amp;HEIGHT=" + map.getSize().h;</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"></font>&nbsp;</div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial">window.open(<span class="EC_890521414-18042009">wmsRequest</span>);</font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"></font>&nbsp;</div>
<div dir="ltr" align="left"><span class="EC_890521414-18042009"><font color="#0000ff" face="Arial">it generates the WMS request for your layer as singleTile, opens 
it in a new window and there you could save the image via right 
click.</font></span></div>
<div>&nbsp;</div>
<div><span class="EC_890521414-18042009"></span><font face="Arial"><font color="#0000ff">A<span class="EC_890521414-18042009">rnd</span></font></font><br></div>
<div class="EC_OutlookMessageHeader" dir="ltr" align="left" lang="de">
<hr>
<font face="Tahoma"><b>Von:</b> users-bounces@openlayers.org 
[mailto:users-bounces@openlayers.org] <b>Im Auftrag von </b>Kwong Hu 
Kiu<br><b>Gesendet:</b> Samstag, 18. April 2009 10:29<br><b>An:</b> 
marco.ferretti@fermasoft.com; users@openlayers.org<br><b>Betreff:</b> Re: 
[OpenLayers-Users] FW: Download image(bitmap)<br></font><br></div>
<div></div><br>Hi<br>
<div><br></div>Very sorry about the lack of information.<br><br>Yes, it's a 
single tile map (using the SingleTile option = true).<br>I am expecting exactly 
what the browser can see. <br>In this case i am displaying a single tile jpeg 
image on the browser requested through the wms service.<br><br>I do not want 
download the base layer. Just those layers i have IsBaseLayer=false.<br>In my 
case. I only have 1 baselayer and 1 non-baselayer.<br><br>Thanks.<br><br>&gt; 
From: marco.ferretti@fermasoft.com<br>&gt; To: users@openlayers.org<br>&gt; 
Date: Sat, 18 Apr 2009 10:13:27 +0200<br>&gt; Subject: Re: [OpenLayers-Users] 
FW: Download image(bitmap)<br>&gt; <br>&gt; Hi<br>&gt; <br>&gt; first of all you 
have to tell us a little bit more on how<br>&gt; you create your map : is it a 
single layer map or a<br>&gt; multilayer map ? then we need to know if you are 
getting the<br>&gt; map in single tile mode or in multi tile mode. Then we 
need<br>&gt; to know what you expect in the image(s) you download : do<br>&gt; 
you expect your users to be able to download exactly what<br>&gt; their browser 
show ( this would mean as many images as many<br>&gt; tiles * number of layers ) 
or do you expect to have one<br>&gt; single image that contains the layers 
merged together ? <br>&gt; <br>&gt; Regards, <br>&gt; <br>&gt; Marco<br>&gt; 
----- Original Message -----<br>&gt; Da : Kwong Hu Kiu 
&lt;kwonghu@hotmail.com&gt;<br>&gt; A : &lt;marco.ferretti@fermasoft.com&gt;, 
&lt;users@openlayers.org&gt;<br>&gt; Oggetto : RE: [OpenLayers-Users] FW: 
Download image(bitmap)<br>&gt; Data : Sat, 18 Apr 2009 16:07:30 +0800<br>&gt; 
<br>&gt; &gt; Thanks for the reply.<br>&gt; &gt; <br>&gt; &gt; So how can i do 
that with javascript ? Yes, i have my own<br>&gt; &gt; custom wms 
service.<br>&gt; &gt; <br>&gt; &gt; I want to be able to download the map using 
javascript<br>&gt; &gt; like you said.<br>&gt; &gt; <br>&gt; &gt; 
Cheers.<br>&gt; &gt; <br>&gt; &gt; &gt; From: 
marco.ferretti@fermasoft.com<br>&gt; &gt; &gt; To: kwonghu@hotmail.com<br>&gt; 
&gt; &gt; Subject: re: [OpenLayers-Users] FW: Download<br>&gt; &gt; &gt; 
image(bitmap) Date: Sat, 18 Apr 2009 09:52:43 +0200<br>&gt; &gt; &gt; <br>&gt; 
&gt; &gt; Hi<br>&gt; &gt; &gt; <br>&gt; &gt; &gt; I don't think i understood 
your question .... if you<br>&gt; &gt; &gt; want to be able to download stuff 
that you see you have<br>&gt; &gt; &gt; several options ( depending on how you 
created the map<br>&gt; &gt; &gt; ... aka how many layers you have ) ; I think 
what you<br>&gt; &gt; &gt; are looking for is a link that has to contain the 
same<br>&gt; &gt; &gt; stuff you send to the WMS server . That shall be 
quite<br>&gt; &gt; &gt; easy using Javascript . As of C# : i don't think 
you<br>&gt; &gt; &gt; have to deal with it since what you see ( the maps ) 
is<br>&gt; &gt; &gt; the result of an http request made client side 
thus,<br>&gt; &gt; &gt; unless you create a wrapper that submits your 
server<br>&gt; &gt; &gt; side code all the infos you need, you can do very 
little<br>&gt; &gt; &gt; with that. <br>&gt; &gt; &gt; hope it helps <br>&gt; 
&gt; &gt; <br>&gt; &gt; &gt; Marco<br>&gt; &gt; &gt; ----- Original Message 
-----<br>&gt; &gt; &gt; Da : Kwong Hu Kiu &lt;kwonghu@hotmail.com&gt;<br>&gt; 
&gt; &gt; A : &lt;users@openlayers.org&gt;, &lt;dev@openlayers.org&gt;<br>&gt; 
&gt; &gt; Oggetto : [OpenLayers-Users] FW: Download image(bitmap)<br>&gt; &gt; 
&gt; Data : Sat, 18 Apr 2009 13:22:52 +0800<br>&gt; &gt; &gt; <br>&gt; &gt; &gt; 
&gt; Hi,<br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; &gt; Any solution to my 
question below?<br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; &gt; Sorry i have to 
send it to dev@openlayers.org.<br>&gt; &gt; &gt; &gt; Hopefully, i can get some 
replies.<br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; &gt; Regards.<br>&gt; &gt; 
&gt; &gt; <br>&gt; &gt; &gt; &gt; From: kwonghu@hotmail.com<br>&gt; &gt; &gt; 
&gt; To: users@openlayers.org<br>&gt; &gt; &gt; &gt; Date: Thu, 16 Apr 2009 
21:20:53 +0800<br>&gt; &gt; &gt; &gt; Subject: [OpenLayers-Users] Download 
image(bitmap)<br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; 
&gt; <br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; &gt; 
<br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; &gt; <br>&gt; 
&gt; &gt; &gt; Hi,<br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; &gt; Currently, I 
am using WMS service to display maps on<br>&gt; &gt; &gt; &gt; openlayers. I am 
wondering if it's possible to allow<br>&gt; &gt; &gt; &gt; users to download the 
bitmap(Map) they are seeing.<br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; &gt; Is 
it supported with openlayers ? or is it possible to<br>&gt; &gt; &gt; &gt; use 
c# code and interact with openlayers javascript?<br>&gt; &gt; &gt; &gt; <br>&gt; 
&gt; &gt; &gt; Interacting c# and javascript is something I have no<br>&gt; &gt; 
&gt; &gt; idea. <br>&gt; &gt; &gt; &gt; Please shed lights.<br>&gt; &gt; &gt; 
&gt; <br>&gt; &gt; &gt; &gt; Cheers. <br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; 
&gt; <br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; &gt; 
<br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; &gt; 
_______________________________________________<br>&gt; &gt; &gt; &gt; Users 
mailing list<br>&gt; &gt; &gt; &gt; Users@openlayers.org<br>&gt; &gt; &gt; &gt; 
http://openlayers.org/mailman/listinfo/users<br>&gt; &gt; &gt; &gt; <br>&gt; 
&gt; &gt; &gt; [Allegato : ATT00000]<br>&gt; &gt; <br>&gt; 
_______________________________________________<br>&gt; Users mailing 
list<br>&gt; Users@openlayers.org<br>&gt; 
http://openlayers.org/mailman/listinfo/users<br></body>
</html>