Re: [OpenMap Users] ImageServer and OMGraphics

From: Don Dietrick <dietrick_at_bbn.com>
Date: Wed, 22 Feb 2006 20:58:06 -0500

Hi Daniel,

I'm assuming that you want to programmatically render lines over the
map using a different layer. You would write a layer (extending
OMGraphicHandlerLayer) that using OMGraphics to draw to the map. You
can then add that layer definition to the properties that you pass to
the ImageServer.

You can use the DemoLayer as an example of how to use different kinds
of OMGraphics. The DemoLayer is an example of a layer that has a set
of OMGraphics that don't change and simply get re-projected when the
map changes.

Hope this helps,

Don

On Feb 22, 2006, at 2:35 PM, Daniel San Martín wrote:

> Hi,
> I have a servlet that returns an image generated with
> ImageServer. ¿How can I use OMGraphics over that
> image?
> I want draw some lines over it but dont know how to
> get the graphic context.
>
> Thank you very much!
>
> This is the code that have:
> float lat = 40;
> float lon = -3;
> int escale = 45000000;
>
> LatLonPoint ll = new LatLonPoint(lat,lon);
> Projection pp = new Mercator(ll,escale,400,200);
> ImageServer iServer = new ImageServer(Props);
> SunJPEGFormatter JpegFF = new SunJPEGFormatter();
> JpegFF.setImageQuality(1);
> iServer.setFormatter(JpegFF);
> response.setContentType("image/jpeg");
> ServletOutputStream fo = response.getOutputStream();
> fo.write( iServer.createImage(pp));
>
> end
>
>
>
> ______________________________________________
> LLama Gratis a cualquier PC del Mundo.
> Llamadas a fijos y móviles desde 1 céntimo por minuto.
> http://es.voice.yahoo.com
>
> --
> [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"]

--
[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 Wed Feb 22 2006 - 21:00:46 EST

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