Closed GoogleCodeExporter closed 8 years ago
Hi,
Good job!
I didn't yet test the code, but shouldn't methods without offset use
Integer.MIN_VALUE instead of -1? If you have a test case for the issue, please
also include that in e.g. this kind of from:
http://code.google.com/p/vopenlayers/source/browse/trunk/src/test/java/org/vaadi
n/vol/demo/ExtentChange.java
cheers,
matti
Original comment by ma...@vaadin.com
on 16 Apr 2013 at 2:29
Hi matti,
you are absolutely right. I started out using -1, but changed it to
Integer.MIN_VALUE because usable offsets are often negative to start with. I
forgot to update the rest of the code (duh).
The anchor point of an openlayers marker icon is at (0,0) and openlayers uses
(-w/2,-h) as the default offset. As such, it was wrong to use -1 as the invalid
value. In fact, openlayers allows any arbitrary numeric value as offset
coordinate. However, I suppose using Integer.MIN_VALUE is OK as it is useless
in practice.
I included an updated patch and also added an example that uses this offset. If
you have more questions or remarks, then let me know.
Regards,
Tim.
Original comment by tim.bruy...@gmail.com
on 16 Apr 2013 at 7:40
Attachments:
This issue was closed by revision r230.
Original comment by ma...@vaadin.com
on 19 Apr 2013 at 1:04
Original issue reported on code.google.com by
tim.bruy...@gmail.com
on 5 Apr 2013 at 1:30Attachments: