Hi all, I am trying to position a Label at the external part of an OMCircle, that is to say at end of the diameter of the Circle.
In trying to accomplish this task i have tryied with the following code, that is part of the ProjectionListener (projectionChanged method):
public void projectionChanged(ProjectionEvent e) {
Point point = new Point();
LatLonPoint llp = omCircle.getCenter();
LatLonPoint externalPoint = llp.getPoint(omCircle.getRadius(), 90f);
Projection proj = e.getProjection();
point = proj.forward(externalPoint);
System.out.println(".projectionChanged() "+point.toString());
omCircle.setLabelLocation(point);
labeler.setNeedToRegenerate(true);
labeler.regenerate(e.getProjection());
}
What I obtain is to always get the label positioned at the center of the OMCircle....What's wrong?
Best regards.
Alessio Iannone
Software Engineer
Mobile: 39 329 8834960
Email: alessio.iannone_at_nextant.it
IM: quonn77_at_hotmail.com (AIM)
http://www.linkedin.com/in/alessioiannone
Web sites of the Martial Arts I play
Nextant - Navcomm Applications
Via Alessandro Noale
See who we know in common Want a signature like this?
___________________________________
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail:
http://it.docs.yahoo.com/nowyoucan.html
--
[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 Thu Feb 28 2008 - 13:04:54 EST