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);
});
}
You find answer?