Re: [OpenMap Users] get lat/lon of a OMPoly

From: Don Dietrick <dietrick@bbn.com>
Date: Tue Mar 11 2003 - 19:21:14 EST

Hi Iván,

On Tuesday, March 11, 2003, at 05:55 AM, ijtejedor wrote:

> Hello people,
>
> I want to get lat/lon of a OMPoly. Now, I know that this OMPoly must be
>
> a RENDERTYPE_OFFSET; my question is: how I do it?

Is it? If you call

objectoGrafico.getRenderType()

what value do you get? The values are stored in OMGraphicConstants.

>
> my code is:
>
> OMPoly objPolilinea = (OMPoly)objetoGrafico;
> objPolilinea.setRenderType(objetoGrafico.RENDERTYPE_OFFSET);

You can't reset the rendertype and expect to get the internal values
translated. The render type just indicates which fields contain valid
data. By changing the render type, you do not populate those fields.

> objPolilinea.getLat(); //this return 0,0
> objPolilinea.getLon(); //this return 0,0
>
> both return 0,0; I think that I need do something but I don't know. I
> try
> to do:

My guess is that the render type is RENDERTYPE_LATLON - and you have to
call getLatLonArray() to get the values, which are in radians.

Cheers,

Don

>
> objPolilinea.generate(mapBean.getProjection());
>
> but return false,
>
> Can someone help me?
>
> thanks
> un saludo.
> Iván.
>
>

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, BBN Technologies, dietrick@bbn.com
10 Moulton Street, Cambridge, MA 02138
617-873-3031 [fax]-2794
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Mar 11 19:22:08 2003

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:35 EDT