Robotics StackExchange | Archived questions

ros2djs zoom and pan

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);
    });
}

Asked by Yug Ajmera on 2019-04-17 14:48:44 UTC

Comments

You find answer?

Asked by Lord_Skimonok on 2019-06-07 09:50:59 UTC

Answers