The output of the MousePosition control is determined by
the formatOutput function of MouseOptions. The format used
is:
prefix + longitude + separator + latitude + postfix
The prefix, number of significant digits of the longitude and latitude,
the separator, and the postfix can all be changed, but sometimes
it is desirable to change the format.
In OpenLayers you would override the formatOutput function to customize
the format in which the geographic coordinates are displayed.
In GWT-OpenLayers the same effect can be achieved by passing
an instance of MousePositionOutput with a custom format
function, see
MousePositionOutput. For example:
MousePositionOutput mpOut = new MousePositionOutput(){
public String format(LonLat lonLat, Map map){
String out = "";
out += lonLat.lon();
out += ", ";
out += lonLat.lat();
return out;
}
};
setFormatOutput(mpOut);