home button on 2d map

I read on the docs that the homebutton is only works to 3d maps , and it is when i set the default camera to look at specific rectangle it is working well, but when im on 2d map. the home button extent is from very far perspective and all over the map.

how can i configure the home button to work also on the 2d map ?

Hello,

It looks like the Camera code currently uses a rectangle that spans the whole globe for the 2D view. I created this issue for us to discuss changing this to use the Camera.DEFAULT_VIEW_RECTANGLE instead. I think it would make sense to change it, but I want to see if the rest of the team has an opinion.

Meanwhile, you can make this change by changing this line of code to use the Camera.DEFAULT_VIEW_RECTANGLE instead of the RECTANGLE.MAX_VALUE: https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/Camera.js#L1191

We have instructions for downloading and building the code base in our contributor documentation: https://github.com/AnalyticalGraphicsInc/cesium/tree/master/Documentation/Contributors/BuildGuide

Best,

Hannah

Just writing to let you know we made this change and it will be included in the 1.35 release available on July 5th.
Thanks for the suggestion!

Best,

Hannah