 ROSLIB.Ros({
      url : 'ws://localhost:9090'
    });

    // Create the main viewer.
    var viewer = new ROS2D.Viewer({
      divID : 'map',
      width : 640,
      height : 480
    });

    // Setup the map client.
    var gridClient = new ROS2D.ImageMapClient({
      ros : ros,
      rootObject : viewer.scene,
      image : 'map.png'
    });
    // Scale the canvas to fit to the map
    gridClient.on('change', function() {
      viewer.scaleToDimensions(gridClient.currentImage.width, gridClient.curre