Hello all.
I want to place programmatically a div on the screen and I need its top left corner to be at a certain coordinate location (Lat/Long). How do I calculate the div's left and top property (in px) based on the lat/long?
So, what I am looking for is convert lat/long to px, so I can set the div's left and top position.
I tried this but didn't work.
div's id is "box"
const screenPoint = view.toScreen(point);
document.getElementById('box').style.position = "absolute"
document.getElementById('box').style.left = screenPoint.x +"px"
document.getElementById('box').style.top = screenPoint.y+"px"Thank you.