Ticket #1426 (closed bug: fixed)
KML icons misalign with hotSpot nodes
| Reported by: | rdewit | Owned by: | tschaub |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.6 Release |
| Component: | Format.KML | Version: | SVN |
| Keywords: | Cc: | ||
| State: | Complete |
Description
KML Icons with hotSpot settings misalign. This is because the offset is not calculated properly. Thanks to Lance Dyas for reporting this issue.
The attached patch properly calculates the offset for hotSpot nodes. Please note that offset units in 'pixels' only work correctly when the image size is 32x32 pixels *or* when a width <w> and/or height <h> are defined in the Icon node (deprecated in KML 2.2beta). In all other cases, please use 'fraction' as units. This is because OL cannot automatically determine the size of the icon.
Bonus improvements:
- implemented 'scale' node parsing
- fixed a typo in the inline style handling
Works in both FF2 and IE6 and tests pass
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

