|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gwtopenmaps.openlayers.client.util.JSObjectWrapper org.gwtopenmaps.openlayers.client.OpenLayersObjectWrapper org.gwtopenmaps.openlayers.client.OpenLayersEObjectWrapper org.gwtopenmaps.openlayers.client.control.ControlOptions org.gwtopenmaps.openlayers.client.control.MousePositionOptions
public class MousePositionOptions
See MousePosition
.
Field Summary |
---|
Fields inherited from class org.gwtopenmaps.openlayers.client.OpenLayersEObjectWrapper |
---|
eventListeners |
Constructor Summary | |
---|---|
MousePositionOptions()
|
Method Summary | |
---|---|
void |
setFormatOutput(MousePositionOutput output)
The output of the MousePosition control is determined by the formatOutput function of MouseOptions. |
void |
setGranularity(int granularity)
Default granularity is 10. |
void |
setNumDigits(int numDigits)
The number of digits to display in the fractional part of decimal LonLat coordinates. |
void |
setPrefix(String prefix)
Text displayed before coordinates: prefixHere 0.00000, 0.0000 |
void |
setSeparator(String separator)
The separator between the Longitude and the Latitude. |
void |
setSuffix(String suffix)
Text displayed after coordinates: 0.00000, 0.0000 suffixHere |
Methods inherited from class org.gwtopenmaps.openlayers.client.OpenLayersEObjectWrapper |
---|
getListeners, narrowToOpenLayersEObjectWrapper, removeListener |
Methods inherited from class org.gwtopenmaps.openlayers.client.OpenLayersObjectWrapper |
---|
getClassName, getEvents, narrowToOpenLayersObjectWrapper |
Methods inherited from class org.gwtopenmaps.openlayers.client.util.JSObjectWrapper |
---|
getJSObject, setJSObject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MousePositionOptions()
Method Detail |
---|
public void setFormatOutput(MousePositionOutput output)
The output of the MousePosition control is determined by the formatOutput function of MouseOptions. The format used is:
prefix + longitude + separator + latitude + postfixThe 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);
public void setNumDigits(int numDigits)
public void setSeparator(String separator)
public void setPrefix(String prefix)
public void setSuffix(String suffix)
public void setGranularity(int granularity)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |