OpenMap-java / openmap

OpenMap is an Open Source JavaBeans-based programmer's toolkit. Using OpenMap, you can quickly build applications and applets that access data from legacy databases and applications.
http://openmap-java.org
Other
73 stars 43 forks source link

OMText label placement is wrong #13

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create an OMTextLabeler with an ANCHOR_RIGHT location anchor
2. Create an OMGraphicList with an OMPoint and an OMText and set the 
OMTextLabeler as the LABEL attribute for both of these.

What is the expected output? What do you see instead?
Expected output is that the label is drawn to the right f the OMText as label. 
Instead the label is drawn on the position of the OMPoint.

What version of the product are you using? On what operating system?
5.1.9 on Windows 7.

Please provide any additional information below.

When the call to "setLabelLocation(getShape(), proj);" is made in "generate", 
the 'fm' member seems to always be null, causing the label to be placed on the 
position of the OMPoint and not to the right of the OMText as expected.
When the call to "setLabelLocation" is commented out and instead placed in the 
"render" method after the call to getShape() and with a 'null' argument for the 
projection since it is no longer known, the label is placed correctly.

Original issue reported on code.google.com by hcl...@gmail.com on 20 Jan 2015 at 1:52