Re: [OpenMap Users] OMText bound and some other questions

From: Carsten Ø. Madsen <com_at_navicon.dk>
Date: Sat, 06 Jul 2013 09:53:08 +0200

Hello

Try calling |prepareForRender| first:

|t.prepareForRender(g);
Rectangle2D bbox = t.getShape().getBounds2D();|

and before calling |distance| try projecting the OMText via the
|generate| method.

BR
Carsten

On 07/05/2013 03:10 PM, SK wrote:

> Hi,
> I have OMText
>
> OMText t = new OMText(x, y, 0, 0, "text",1);
>
> I want to get bounds
> t.getPolyBounds();
> but I have null
>
> when I try to get distance
> t.distance(some_x,some_y)
> I got infinity.
>
> and when I try to get closest OMGraphic
> Point p = projection.forward(t.getLat(), t.getLon());
> myOmList.findClosest(p.x, p.y, 10)
> I get null
>
> what I do wrong?
>
> Thank you,
> CK



--
[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 Sat Jul 06 2013 - 03:55:00 EDT

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