But I want some buffer around the Rectangle so that Rectangle appear in the middle of the screen with some space around after the flight completes, something like this -
My Usecase: I’m trying to zoom to entities (polygon, line, etc) when the user clicks on it, flying to the entity is not good enough for me as it doesn’t zoom to the entity much (i tried a lower value of the range, but didn’t help). So I’m trying to get Rectangle for entity and zoom to the Rectangle. It’s working fine but as mentioned above, the camera fills the whole screen with an entity, I want to add some buffer so the entity appears in the centre of the screen.
Thanks for your reply, can you please provide an example, I still couldn’t figure it out.
Edit 1
I tried to zoom out the camera once the flight is complete. It works but it’s not smooth as the camera zooms out suddenly after a smooth flight transition-
hi @Jacky, thanks for your response. I saw a similar solution on Stackoverflow and tried it but it was not working correctly for me for some reason, so I resorted to the above solution
Hi @sam.rothstein, I’ve already gone through that thread before posting my follow-up question, but the issue still persists. For some terrain, it works fine but for some, the height provided getRectangleCameraCoordinates is off and the camera goes under the terrain.