Skip to content

Incorrect position in icon-position example #1234

Open
@gberaudo

Description

@gberaudo

The left icon should have its text anchored to the bottom.
This is not the case:
image

This is due to OL returning a null anchor: iconStyle.getAnchor() during first rendering.

If you click "toggle clampToGround", the text will be placed correctly.
image
I think that as soon as the icon is actually loaded by OpenLayers, then subsequent calls to iconStyle.getAnchor() will return a valid anchor.

In order to fix this issue, we should thus track the loading state of the image and (re)create the counterpart geometry when it changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions