public Canvas getViewPanel() {
		VLayout layout = new VLayout();
		layout.setWidth100();
		layout.setHeight100();

		// Create the map, using the wmsMap configuration (mapOsm.xml):
		final MapWidget map = new MapWidget("mapOsm", "gwtExample");

		VLayout mapLayout = new VLayout();
		mapLayout.setShowEdges(true);
		mapLayout.setHeight("60%");
		mapLayout.addMember(map);

		VLayout labelLayout = new VLayout();
		final Label label = new Label();
		labelLayout.addMember(label);

		/**
		 * Listener implementation that prints out the mouse position.
		 * 
		 * @author Pieter De Graef
		 */
		class MouseMoveListener extends AbstractListener {

			public void onMouseMove(ListenerEvent event) {
				Coordinate screenPosition = event.getScreenPosition();
				Coordinate worldPosition = event.getWorldPosition();
				String x = NumberFormat.getFormat("0.000").format(worldPosition.getX());
				String y = NumberFormat.getFormat("0.000").format(worldPosition.getY());
				label.setContents(MESSAGES.customControllerScreenCoordinates() + " = "
						+ screenPosition + "<br/>"
						+ MESSAGES.customControllerWorldCoordinates() + " = (" + x + ", " + y
						+ ")");
			}
		}
		map.addListener(new MouseMoveListener());

		layout.addMember(mapLayout);
		layout.addMember(labelLayout);

		return layout;
	}
public Canvas getViewPanel ( ) { VLayout layout = new VLayout ( ) ; layout . setWidth100 ( ) ; layout . setHeight100 ( ) ; final MapWidget map = new MapWidget ( "mapOsm" , "gwtExample" ) ; VLayout mapLayout = new VLayout ( ) ; mapLayout . setShowEdges ( true ) ; mapLayout . setHeight ( "60%" ) ; mapLayout . addMember ( map ) ; VLayout labelLayout = new VLayout ( ) ; final Label label = new Label ( ) ; labelLayout . addMember ( label ) ; class MouseMoveListener extends AbstractListener { public void onMouseMove ( ListenerEvent event ) { Coordinate screenPosition = event . getScreenPosition ( ) ; Coordinate worldPosition = event . getWorldPosition ( ) ; String x = NumberFormat . getFormat ( "0.000" ) . format ( worldPosition . getX ( ) ) ; String y = NumberFormat . getFormat ( "0.000" ) . format ( worldPosition . getY ( ) ) ; label . setContents ( MESSAGES . customControllerScreenCoordinates ( ) + " = " + screenPosition + "<br/>" + MESSAGES . customControllerWorldCoordinates ( ) + " = (" + x + ", " + y + ")" ) ; } } map . addListener ( new MouseMoveListener ( ) ) ; layout . addMember ( mapLayout ) ; layout . addMember ( labelLayout ) ; return layout ; }
@return The viewPanel Canvas