Re: zoom for HTML5 tool file is weak compared to program zoom

by PacWood » Wed Mar 14, 2018 8:18 am

Hello,

I put in a 6 second delay timer and then did the getUserPreferences();

The code is able to access the HOME data.

When the setSelectedItems is called, I pass in a list:
var itemSel = ["209","210"];
HOME.setSelectedItems(itemSel);

However, the zoom in the .html file does not zoom into the selected Item.

Below is the code:

Code: Select all

<script>
  var HPC =  viewHome("viewerCanvas",   
           homeUrl,          
           onerror,           
           onprogression,    
          { roundsPerMinute: 0,                
            navigationPanel: "default",                                           
            levelsAndCamerasListId: "levelsAndCameras",         
            selectableLevels: ["Level 1", "Level 2"],     
            activateCameraSwitchKey: true                      
          });  
    
   setTimeout(myTimer, 6000);

function myTimer() {
   var UP = HPC.getUserPreferences();
   var HOME = HPC.getHome();
   var items = HOME.getSelectableViewableItems();
   console.log(items);
   UP.setAerialViewCenteredOnSelectionEnabled(true);
   console.log('CCCC');
   var itemSel = ["209","210"];
   HOME.setSelectedItems(itemSel);
} 
</script>

Included at the bottom of this post is a screen shot.
The building is on the left and the
list of selectable items is shown in the console.

The zoom is not zooming into the selection.

Am I doing the selection correctly?

Is there some line of code that I may be missing?

Thank you very much for your advice.



Image