ros2djs zoom and pan

asked 2019-04-17 14:48:44 -0600

Yug Ajmera gravatar image

updated 2019-04-17 14:55:54 -0600

jayess gravatar image

I want to use the option of zoom and pan on the web page using ros2djs. What change in the code should be done to do so ? Current code :

function viewMap() {

     var viewer = new ROS2D.Viewer({
        divID : 'map',
        width : 600,
        height : 500
    });

     var gridClient = new ROS2D.OccupancyGridClient({
        ros : ros,
        rootObject : viewer.scene,
        continuous : true
    });

     gridClient.on('change', function(){
    viewer.scaleToDimensions(gridClient.currentGrid.width, gridClient.currentGrid.height);
    });
}
edit retag flag offensive close merge delete

Comments

You find answer?

Lord_Skimonok gravatar image Lord_Skimonok  ( 2019-06-07 09:50:59 -0600 )edit