Hi Chris,
I can easily write GeoServer classes and interfaces to render WMS requests as SWF output format, I can reuse most of the KMZ writer to do this ... infact I store each WMS layer as an image into the KMZ file.
I'll do it into GeoServer WCS branch.
On 4/28/06, systemintegrators.ca <[EMAIL PROTECTED]
> wrote:
Sorry, I didn't answered sooner but I was out.
The swf writer knows to use only JPEG files so ... :( (the swf writer it's
not mine, like I said before, but there is the source code).
Here are my functions:
public void generateSWF(InputStream in, OutputStream out)
{
try
{
//--create a shape that uses the image as a fill
// (images cannot be placed directly - they can only be used as
shape fills)
int[] size = new int[2];
Shape image = ImageUtil.shapeForImage( in, size );
int width = size[0];
int height = size[1];
Movie movie = new Movie( width, height, 12, 5, null );
movie.appendFrame().placeSymbol( image, 0, 0 );
movie.write(out);
in.close();
}
catch(Exception ex)
{
ex.printStackTrace();
}
}
or
// I used this one
public void generateSWF(byte[] in, int[] size, OutputStream out)
{
try
{
JPEG imageJPEG = new JPEG(in);
int width = size[0];
int height = size[1];
Shape image = ImageUtil.shapeForImage( imageJPEG, width, height
);
Movie movie = new Movie( width, height, 12, 5, null );
movie.appendFrame().placeSymbol( image, 0, 0 );
movie.write(out);
}
catch(Exception ex)
{
ex.printStackTrace();
}
}
I use this functions into a servlet which generates the swf file.
....
ByteArrayOutputStream baos = new ByteArrayOutputStream( 1000
);
javax.imageio.ImageIO.write( img, "jpeg", baos );
baos.flush();
byte[] resultImageAsRawBytes = baos.toByteArray();
baos.close();
generateSWF(resultImageAsRawBytes, new int[]{mapGetWidth(),
mapGetHeight()}, ouputStream);
...
Hope it helps you.
Best regards,
B
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Chris
Holmes
Sent: Friday, April 28, 2006 1:28 PM
To: systemintegrators.ca
Cc: [email protected]
Subject: Re: FW: [Geotools-gt2-users] Sample of web application with
Geotools
systemintegrators.ca wrote:
> Thanks Jody,
>
> I've read an article about ajax, svg and swf on the geotools website.
> I took a look on the internet about some java open source swf writers
> and I found one which looks OK. I used that one to create an export
> into swf. I think with that one you can generate animated swf files
> for those who want something like that into theirs applications. The
> swf writer can be downloaded from
> http://sourceforge.net/projects/javaswf
> Hope it will help someone.
So you have GeoTools outputting maps as SWF? Any chance you can share the
code? We could perhaps integrate it in to GeoServer, so users could have
SWF output from WMS...
best regards,
Chris
>
> Best regards,
> B
>
> -----Original Message-----
> From: Jody Garnett [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 28, 2006 12:21 PM
> To: systemintegrators.ca
> Cc: [email protected]
> Subject: Re: [Geotools-gt2-users] Sample of web application with
> Geotools
>
> systemintegrators.ca wrote:
>
>>Hi all,
>>
>>I attached a screenshot of a web application that uses Geotools. The
>>application it's just my way of learning Geotools ( great work :) ).
>>
>
> Congrats, if possible it would be nice to use this as the screen snap
> for the next geotools release.
> Jody
>
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier Download IBM WebSphere Application Server v.1.0.1 based on
> Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=1216
> 42 _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
--
Chris Holmes
The Open Planning Project
http://topp.openplans.org
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
--
---------------------------------------------------------
Alessio Fabiani
Software Engineer
http://afabiani.wordpress.com
---------------------------------------------------------
