openlayers-elements icon indicating copy to clipboard operation
openlayers-elements copied to clipboard

Allow to position overlays upfront

Open tpluscode opened this issue 6 years ago • 2 comments

Extend overlays with lat/lon and x/y attributes to set the position of overlays declaratively. Should also support the positioning property.

tpluscode avatar May 08 '19 13:05 tpluscode

This seems to work for the initial position, but does not work if you change the declaration on a later time.

veith avatar Feb 15 '22 19:02 veith

@veith, sorry I forgot about this comment for a while.

You mean that works for initial position? The idea here was to add declarative positioning like <ol-overlay x=45 y=0>. Currently the only way is to call setPosition()

That said, I'm not sure if x/y should be separate attributes. If they would call the setter underneath then maybe better to make it a complex object property like <ol-overlay position='{ x: 45, y:0 }'> so that the whole value is always set

tpluscode avatar Mar 16 '22 07:03 tpluscode