how can i know the limit of the map size ?

when i press on the map - i have some function that write to log the position of the mouse click event location.

I want to write to the log the distence of this location from the map limit -

I can’t find a way to get the map height and map width

How to do it ?

Can you explain what you mean by “distance from the map limit”?

Do you mean the edge of the screen? See Scene.drawingBufferHeight.

Or the overall size of the map in meters? That’s a more difficult question, as it takes into account think like the map’s 2D projection.



I simple mean that i need to know if in on the most left upper curner of the map or in the Upper corner or corner (right corner or left corner)

In terms of screen space like in pixels, or in terms of real world measurements like meters?

If you just want to get the coordinates, see our Picking example.

i need to know the screen space like in pixels.
if the mouse position is close to the most right and top screen adge -

this must be the mouse click position in screen space pixels

how to do it ?
in the example that you add this is the terms of real world .. not in pixels - and i need in pixels

You can get the actual viewer’s dimensions on the screen (see here:!profile/cesium-dev/APn2wQdZ3vrCeZdMyKJsk0nLn04iSkFvoN-S_-oJY5TT_E1TXalIXH6i0Ls1VHdxQ8D1GhEcSNar/cesium-dev/n9Bskqi-JsI/fX0i0T3pAwAJ )

Is that what you’re looking for?