Search code examples
3dgisopenglobus

How to fit zoom to a bounding box in OpenGlobus?


I'm porting some Leaflet map code to OpenGlobus and would like to have the camera zoom to a bounding box.

Leaflet code looks like this:

    map.fitBounds([

      [ data.boundingbox[0], data.boundingbox[2] ],
      [ data.boundingbox[1], data.boundingbox[3] ]

    ]);

I suspect I need to use createBoundsByExtent() and then zoom to the bounds. A short example would help me here. I tried to grep through the examples for that function.


Solution

  • check the example for cameras View Extent View extent example

    planet.viewExtent/flyExtent(extent)
    

    where extent type of Extent