<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<br><br>I am still figuring out how to do this.<br><br>I have a look at Mapfish. Using openlayers underneath.<br>http://map.veloland.ch/<br><br>They have a way of displaying the bitmap in pdf when the print button is clicked.<br><br>Anyone knows how that's done ? I want to incorporate that function into the openlayers. <br><br>That's what I wanted to do. Click on Print. Looks cool.<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: Sun, 3 May 2009 20:02:29 +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"><span class="EC_359345117-03052009"><font color="#0000ff" face="Arial">Hi,</font></span></div>
<div dir="ltr" align="left"><span class="EC_359345117-03052009"><font color="#0000ff" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="EC_359345117-03052009"><font color="#0000ff" face="Arial">sorry, but I cann't help you. I have an idea, how to request
serverside the singleTile image. But how to force a download clientside for this
image I have no clue.</font></span></div>
<div dir="ltr" align="left"><span class="EC_359345117-03052009"><font color="#0000ff" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="EC_359345117-03052009"><font color="#0000ff" face="Arial">Perhaps you have to save the image serverside, that the image is
reachable through the internet and then clientside force a download of the
image.</font></span></div>
<div dir="ltr" align="left"><span class="EC_359345117-03052009"><font color="#0000ff" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="EC_359345117-03052009"><font color="#0000ff" face="Arial">the url for the singleTile should be:</font></span></div>
<div dir="ltr" align="left"><span class="EC_359345117-03052009"><font color="#0000ff" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="EC_359345117-03052009"><font color="#0000ff" face="Arial">singleTileLayer - your singleTile WMS layer</font></span></div>
<div><font color="#0000ff" face="Arial"></font> </div>
<div dir="ltr" align="left"><span class="EC_359345117-03052009"><font color="#0000ff" face="Arial">singleTileRequestUrl = singleTileLayer.getFullRequestString() +
"&BBOX=" + singleTileLayer.getExtent().toBBOX() + "&WIDTH=" +
map.getSize().w + "&HEIGHT=" + map.getSize().h;</font></span></div>
<div dir="ltr" align="left"><span class="EC_359345117-03052009"><font color="#0000ff" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="EC_359345117-03052009"><font color="#0000ff" face="Arial">Arnd</font></span></div><br>
<div class="EC_OutlookMessageHeader" dir="ltr" align="left" lang="de">
<hr>
<font face="Tahoma"><b>Von:</b> kwonghu@hotmail.com [mailto:kwonghu@hotmail.com]
<br><b>Gesendet:</b> Sonntag, 3. Mai 2009 13:42<br><b>An:</b>
arnd.wippermann@web.de<br><b>Cc:</b> users@openlayers.org<br><b>Betreff:</b> RE:
AW: [OpenLayers-Users] FW: Download image(bitmap)<br></font><br></div>
<div></div><br>Hi,<br><br>Do you know how I can use the server-side scripting to
do this ?<br><br>How can I interact openlayers with the servers ?<br><br>Any
example ?<br><br>Cheers.<br>
<div><br> </div><br>
<hr id="EC_stopSpelling">
From: arnd.wippermann@web.de<br>To: kwonghu@hotmail.com<br>CC:
users@openlayers.org<br>Subject: AW: [OpenLayers-Users] FW: Download
image(bitmap)<br>Date: Sat, 18 Apr 2009 21:29:17 +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"><span class="EC_EC_609102319-18042009"><font color="#0000ff" face="Arial">Hi,</font></span></div>
<div dir="ltr" align="left"><span class="EC_EC_609102319-18042009"><font color="#0000ff" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="EC_EC_609102319-18042009"><font color="#0000ff" face="Arial">if you only want, that the user can download your singleTiled WMS,
then inform the user, that they could save the image via right click and save
as. There is no need to download the image, because it is already
there.</font></span></div>
<div dir="ltr" align="left"><span class="EC_EC_609102319-18042009"><font color="#0000ff" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="EC_EC_609102319-18042009"><font color="#0000ff" face="Arial">Otherwise you have to use serverside scripting and sending the
image once again.</font></span></div>
<div dir="ltr" align="left"><span class="EC_EC_609102319-18042009"><font color="#0000ff" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="EC_EC_609102319-18042009"><font color="#0000ff" face="Arial">Arnd</font></span></div><br>
<div class="EC_EC_OutlookMessageHeader" dir="ltr" align="left" lang="de">
<hr>
<font face="Tahoma"><b>Von:</b> kwonghu@hotmail.com [mailto:kwonghu@hotmail.com]
<br><b>Gesendet:</b> Samstag, 18. April 2009 16:55<br><b>An:</b>
arnd.wippermann@web.de; users@openlayers.org<br><b>Betreff:</b> RE: AW:
[OpenLayers-Users] FW: Download image(bitmap)<br></font><br></div>
<div></div><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="EC_EC_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_EC_EC_890521414-18042009">Hi,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_EC_EC_890521414-18042009"></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_EC_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_EC_EC_890521414-18042009"></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_EC_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_EC_EC_890521414-18042009"></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span class="EC_EC_EC_890521414-18042009">var wmsRequest=yourWMS.getFullRequestString() +
"&BBOX=" + yourWMS.getExtent().toBBOX() + "&WIDTH=" + map.getSize().w +
"&HEIGHT=" + map.getSize().h;</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial">window.open(<span class="EC_EC_EC_890521414-18042009">wmsRequest</span>);</font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"></font> </div>
<div dir="ltr" align="left"><span class="EC_EC_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> </div>
<div><span class="EC_EC_EC_890521414-18042009"></span><font face="Arial"><font color="#0000ff">A<span class="EC_EC_EC_890521414-18042009">rnd</span></font></font><br></div>
<div class="EC_EC_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>>
From: marco.ferretti@fermasoft.com<br>> To: users@openlayers.org<br>>
Date: Sat, 18 Apr 2009 10:13:27 +0200<br>> Subject: Re: [OpenLayers-Users]
FW: Download image(bitmap)<br>> <br>> Hi<br>> <br>> first of all you
have to tell us a little bit more on how<br>> you create your map : is it a
single layer map or a<br>> multilayer map ? then we need to know if you are
getting the<br>> map in single tile mode or in multi tile mode. Then we
need<br>> to know what you expect in the image(s) you download : do<br>>
you expect your users to be able to download exactly what<br>> their browser
show ( this would mean as many images as many<br>> tiles * number of layers )
or do you expect to have one<br>> single image that contains the layers
merged together ? <br>> <br>> Regards, <br>> <br>> Marco<br>>
----- Original Message -----<br>> Da : Kwong Hu Kiu
<kwonghu@hotmail.com><br>> A : <marco.ferretti@fermasoft.com>,
<users@openlayers.org><br>> Oggetto : RE: [OpenLayers-Users] FW:
Download image(bitmap)<br>> Data : Sat, 18 Apr 2009 16:07:30 +0800<br>>
<br>> > Thanks for the reply.<br>> > <br>> > So how can i do
that with javascript ? Yes, i have my own<br>> > custom wms
service.<br>> > <br>> > I want to be able to download the map using
javascript<br>> > like you said.<br>> > <br>> >
Cheers.<br>> > <br>> > > From:
marco.ferretti@fermasoft.com<br>> > > To: kwonghu@hotmail.com<br>>
> > Subject: re: [OpenLayers-Users] FW: Download<br>> > >
image(bitmap) Date: Sat, 18 Apr 2009 09:52:43 +0200<br>> > > <br>>
> > Hi<br>> > > <br>> > > I don't think i understood
your question .... if you<br>> > > want to be able to download stuff
that you see you have<br>> > > several options ( depending on how you
created the map<br>> > > ... aka how many layers you have ) ; I think
what you<br>> > > are looking for is a link that has to contain the
same<br>> > > stuff you send to the WMS server . That shall be
quite<br>> > > easy using Javascript . As of C# : i don't think
you<br>> > > have to deal with it since what you see ( the maps )
is<br>> > > the result of an http request made client side
thus,<br>> > > unless you create a wrapper that submits your
server<br>> > > side code all the infos you need, you can do very
little<br>> > > with that. <br>> > > hope it helps <br>>
> > <br>> > > Marco<br>> > > ----- Original Message
-----<br>> > > Da : Kwong Hu Kiu <kwonghu@hotmail.com><br>>
> > A : <users@openlayers.org>, <dev@openlayers.org><br>>
> > Oggetto : [OpenLayers-Users] FW: Download image(bitmap)<br>> >
> Data : Sat, 18 Apr 2009 13:22:52 +0800<br>> > > <br>> > >
> Hi,<br>> > > > <br>> > > > Any solution to my
question below?<br>> > > > <br>> > > > Sorry i have to
send it to dev@openlayers.org.<br>> > > > Hopefully, i can get some
replies.<br>> > > > <br>> > > > Regards.<br>> >
> > <br>> > > > From: kwonghu@hotmail.com<br>> > >
> To: users@openlayers.org<br>> > > > Date: Thu, 16 Apr 2009
21:20:53 +0800<br>> > > > Subject: [OpenLayers-Users] Download
image(bitmap)<br>> > > > <br>> > > > <br>> > >
> <br>> > > > <br>> > > > <br>> > > >
<br>> > > > <br>> > > > <br>> > > > <br>>
> > > Hi,<br>> > > > <br>> > > > Currently, I
am using WMS service to display maps on<br>> > > > openlayers. I am
wondering if it's possible to allow<br>> > > > users to download the
bitmap(Map) they are seeing.<br>> > > > <br>> > > > Is
it supported with openlayers ? or is it possible to<br>> > > > use
c# code and interact with openlayers javascript?<br>> > > > <br>>
> > > Interacting c# and javascript is something I have no<br>> >
> > idea. <br>> > > > Please shed lights.<br>> > >
> <br>> > > > Cheers. <br>> > > > <br>> > >
> <br>> > > > <br>> > > > <br>> > > >
<br>> > > > <br>> > > >
_______________________________________________<br>> > > > Users
mailing list<br>> > > > Users@openlayers.org<br>> > > >
http://openlayers.org/mailman/listinfo/users<br>> > > > <br>>
> > > [Allegato : ATT00000]<br>> > <br>>
_______________________________________________<br>> Users mailing
list<br>> Users@openlayers.org<br>>
http://openlayers.org/mailman/listinfo/users<br></body>
</html>