spatialillusions / milsymbol

Military Symbols in JavaScript
www.spatialillusions.com/milsymbol
MIT License
531 stars 132 forks source link

Anchor Information #260

Closed cursorcl closed 1 year ago

cursorcl commented 3 years ago

When I like to draw symbols asCanvas in Cesium and apply getAnchor() -x and -y offset the icon is showed far of the setting position.

It always happend when I enable infoFields how in the image. problem

How I know the correct offset to apply?

spatialillusions commented 3 years ago

Sort of like this should work.

https://cesium.com/blog/2016/07/20/cesium-and-milsymbol/

On 5 May 2021, at 17:47, Eliecer Osorio @.***> wrote:

 When I like to draw symbols asCanvas in Cesium and apply getAnchor() -x and -y offset the icon is showed far of the setting position.

It always happend when I enable infoFields how in the image.

How I know the correct offset to apply?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

cursorcl commented 3 years ago

It is precisely from this page that I have taken the example.

When placing the texts, the size of the resulting canvas grows and the offset is apparently not correct.

spatialillusions commented 1 year ago

Just used the octagon offset in another program, if it doesn't work, it is a bug in Cesium and not in milsymbol. If you still think it is a milsymbol bug, please provide a code example.