Re: [OpenMap Users] Creating a Jpeg image from part of a MapBean

From: Don Dietrick <dietrick_at_bbn.com>
Date: Tue, 3 Aug 2004 17:42:06 -0400

Hi Laura,

I think I'd create an ImageServer on the fly, with a Layers[] that you
want to be in the image along with the image formatter you want (like
the AcmeJpegImageFormatter). Then, call imageServer.create(projection)
to get the image bytes, which you can push out to a file.

This method will work for layers that are or are not part of the
current map, although you probably want to be careful of the projection
of the image is different than the image of the map, making sure that
the projection of the layer is set back to the MapBean's projection
before the map gets repainted, if the layer is part of the map.

- Don

On Aug 2, 2004, at 4:55 AM, Laura Paterson wrote:

> Hi,
>
> In my application I have some raster (CADRG) and vector (shape files)
> data.
> I overlay this with application-specific graphics. What I would like
> to do
> is cut out a jpeg image of the displayed map area, but only of certain
> layers, i.e. the raster and vector layer provide useful mapping info,
> but
> the application layers should not be persisted. Can anyone give me any
> pointers on how to achieve this? I already use the SaveAs... menu
> item in
> my code.
>
> Ideally I would also be able to get an image from the map that is not
> necessarily the showing map area - i.e. to pass in a scale and area
> and have
> a jpeg generated from this. This sounds similar to some of the
> SimpleHttpImageServer posts I have read recently, however I am unsure
> if
> this can be implemented so that all the work is performed locally.
> Again,
> any help would be much appreciated!
>
> Cheers,
> Laura
>
>
> General Dynamics United Kingdom Limited
> Registered in England and Wales No. 1911653
> Registered Office: 100 New Bridge Street, London, EC4V 6JA
> --
> [To unsubscribe to this list send an email to "majdart_at_bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]
>
>


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick_at_bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Aug 03 2004 - 17:42:44 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:05 EDT