[OpenLayers-Dev] [OpenLayers-Users] FW: Download image(bitmap)
Kwong Hu Kiu
kwonghu at hotmail.com
Tue May 5 08:31:52 EDT 2009
I am still figuring out how to do this.
I have a look at Mapfish. Using openlayers underneath.
http://map.veloland.ch/
They have a way of displaying the bitmap in pdf when the print button is clicked.
Anyone knows how that's done ? I want to incorporate that function into the openlayers.
That's what I wanted to do. Click on Print. Looks cool.
Thanks
From: arnd.wippermann at web.de
To: kwonghu at hotmail.com
Subject: AW: [OpenLayers-Users] FW: Download image(bitmap)
Date: Sun, 3 May 2009 20:02:29 +0200
Hi,
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.
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.
the url for the singleTile should be:
singleTileLayer - your singleTile WMS layer
singleTileRequestUrl = singleTileLayer.getFullRequestString() +
"&BBOX=" + singleTileLayer.getExtent().toBBOX() + "&WIDTH=" +
map.getSize().w + "&HEIGHT=" + map.getSize().h;
Arnd
Von: kwonghu at hotmail.com [mailto:kwonghu at hotmail.com]
Gesendet: Sonntag, 3. Mai 2009 13:42
An:
arnd.wippermann at web.de
Cc: users at openlayers.org
Betreff: RE:
AW: [OpenLayers-Users] FW: Download image(bitmap)
Hi,
Do you know how I can use the server-side scripting to
do this ?
How can I interact openlayers with the servers ?
Any
example ?
Cheers.
From: arnd.wippermann at web.de
To: kwonghu at hotmail.com
CC:
users at openlayers.org
Subject: AW: [OpenLayers-Users] FW: Download
image(bitmap)
Date: Sat, 18 Apr 2009 21:29:17 +0200
Hi,
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.
Otherwise you have to use serverside scripting and sending the
image once again.
Arnd
Von: kwonghu at hotmail.com [mailto:kwonghu at hotmail.com]
Gesendet: Samstag, 18. April 2009 16:55
An:
arnd.wippermann at web.de; users at openlayers.org
Betreff: RE: AW:
[OpenLayers-Users] FW: Download image(bitmap)
Hi,
I have only one wms layer and is a single tile. I
would like to make it user friendly.
Want to have a button called
'generate bitmap' or similar.
That zip up the bitmap and send it to the
user so they can view at a later stage.
Thanks.
From: arnd.wippermann at web.de
To: kwonghu at hotmail.com
Subject: AW:
[OpenLayers-Users] FW: Download image(bitmap)
Date: Sat, 18 Apr 2009 16:33:51
+0200
Hi,
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.
if it's not singleTiled you can try something
like this:
var wmsRequest=yourWMS.getFullRequestString() +
"&BBOX=" + yourWMS.getExtent().toBBOX() + "&WIDTH=" + map.getSize().w +
"&HEIGHT=" + map.getSize().h;
window.open(wmsRequest);
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.
Arnd
Von: users-bounces at openlayers.org
[mailto:users-bounces at openlayers.org] Im Auftrag von Kwong Hu
Kiu
Gesendet: Samstag, 18. April 2009 10:29
An:
marco.ferretti at fermasoft.com; users at openlayers.org
Betreff: Re:
[OpenLayers-Users] FW: Download image(bitmap)
Hi
Very sorry about the lack of information.
Yes, it's a
single tile map (using the SingleTile option = true).
I am expecting exactly
what the browser can see.
In this case i am displaying a single tile jpeg
image on the browser requested through the wms service.
I do not want
download the base layer. Just those layers i have IsBaseLayer=false.
In my
case. I only have 1 baselayer and 1 non-baselayer.
Thanks.
>
From: marco.ferretti at fermasoft.com
> To: users at openlayers.org
>
Date: Sat, 18 Apr 2009 10:13:27 +0200
> Subject: Re: [OpenLayers-Users]
FW: Download image(bitmap)
>
> Hi
>
> first of all you
have to tell us a little bit more on how
> you create your map : is it a
single layer map or a
> multilayer map ? then we need to know if you are
getting the
> map in single tile mode or in multi tile mode. Then we
need
> to know what you expect in the image(s) you download : do
>
you expect your users to be able to download exactly what
> their browser
show ( this would mean as many images as many
> tiles * number of layers )
or do you expect to have one
> single image that contains the layers
merged together ?
>
> Regards,
>
> Marco
>
----- Original Message -----
> Da : Kwong Hu Kiu
<kwonghu at hotmail.com>
> A : <marco.ferretti at fermasoft.com>,
<users at openlayers.org>
> Oggetto : RE: [OpenLayers-Users] FW:
Download image(bitmap)
> Data : Sat, 18 Apr 2009 16:07:30 +0800
>
> > Thanks for the reply.
> >
> > So how can i do
that with javascript ? Yes, i have my own
> > custom wms
service.
> >
> > I want to be able to download the map using
javascript
> > like you said.
> >
> >
Cheers.
> >
> > > From:
marco.ferretti at fermasoft.com
> > > To: kwonghu at hotmail.com
>
> > Subject: re: [OpenLayers-Users] FW: Download
> > >
image(bitmap) Date: Sat, 18 Apr 2009 09:52:43 +0200
> > >
>
> > Hi
> > >
> > > I don't think i understood
your question .... if you
> > > want to be able to download stuff
that you see you have
> > > several options ( depending on how you
created the map
> > > ... aka how many layers you have ) ; I think
what you
> > > are looking for is a link that has to contain the
same
> > > stuff you send to the WMS server . That shall be
quite
> > > easy using Javascript . As of C# : i don't think
you
> > > have to deal with it since what you see ( the maps )
is
> > > the result of an http request made client side
thus,
> > > unless you create a wrapper that submits your
server
> > > side code all the infos you need, you can do very
little
> > > with that.
> > > hope it helps
>
> >
> > > Marco
> > > ----- Original Message
-----
> > > Da : Kwong Hu Kiu <kwonghu at hotmail.com>
>
> > A : <users at openlayers.org>, <dev at openlayers.org>
>
> > Oggetto : [OpenLayers-Users] FW: Download image(bitmap)
> >
> Data : Sat, 18 Apr 2009 13:22:52 +0800
> > >
> > >
> Hi,
> > > >
> > > > Any solution to my
question below?
> > > >
> > > > Sorry i have to
send it to dev at openlayers.org.
> > > > Hopefully, i can get some
replies.
> > > >
> > > > Regards.
> >
> >
> > > > From: kwonghu at hotmail.com
> > >
> To: users at openlayers.org
> > > > Date: Thu, 16 Apr 2009
21:20:53 +0800
> > > > Subject: [OpenLayers-Users] Download
image(bitmap)
> > > >
> > > >
> > >
>
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
>
> > > Hi,
> > > >
> > > > Currently, I
am using WMS service to display maps on
> > > > openlayers. I am
wondering if it's possible to allow
> > > > users to download the
bitmap(Map) they are seeing.
> > > >
> > > > Is
it supported with openlayers ? or is it possible to
> > > > use
c# code and interact with openlayers javascript?
> > > >
>
> > > Interacting c# and javascript is something I have no
> >
> > idea.
> > > > Please shed lights.
> > >
>
> > > > Cheers.
> > > >
> > >
>
> > > >
> > > >
> > > >
> > > >
> > > >
_______________________________________________
> > > > Users
mailing list
> > > > Users at openlayers.org
> > > >
http://openlayers.org/mailman/listinfo/users
> > > >
>
> > > [Allegato : ATT00000]
> >
>
_______________________________________________
> Users mailing
list
> Users at openlayers.org
>
http://openlayers.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20090505/233d1e81/attachment.html
More information about the Dev
mailing list