org.gwtopenmaps.openlayers.client.Map Java Examples

The following examples show how to use org.gwtopenmaps.openlayers.client.Map. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StationSelectorMap.java    From SensorWebClient with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void addMapControls(MapOptions mapOptions) {
    super.addMapControls(mapOptions);
    MousePositionOptions options = new MousePositionOptions();
    options.setFormatOutput(new MousePositionOutput() {
        
        @Override
        public String format(LonLat lonLat, Map map) {
            lonLat.transform(getMapProjection(), EPSG_4326);
            StringBuilder sb = new StringBuilder();
            sb.append("Lon: ").append(lonLat.lon()).append(", ");
            sb.append("Lat: ").append(lonLat.lat());
            sb.append(" (").append(map.getProjection()).append(")");
            return sb.toString();
            
        }
    });
    map.addControl(new MousePosition(options));
}
 
Example #2
Source File: OpenlayersMarker.java    From SensorWebClient with GNU General Public License v2.0 6 votes vote down vote up
public void createInfoPopup(final Map map) {
    EventHandler popupHandler = new EventHandler() {
        @Override
        public void onHandle(EventObject eventObject) {

            if (OpenlayersMarker.this.popup != null) {
                map.removePopup(OpenlayersMarker.this.popup);
            }
            Pixel pixel = new Pixel(0, 0);
            Size size = new Size(300, 200);
            FramedCloud frame = new FramedCloud("marker-info",
                                                OpenlayersMarker.this.coords,
                                                size,
                                                OpenlayersMarker.this.infoTxt,
                                                new Icon("", new Size(0, 0), pixel),
                                                true);
            OpenlayersMarker.this.setPopup(frame);
            map.addPopup(OpenlayersMarker.this.popup);
        }
    };
    //getEvents().register("click", this, popupHandler);
}
 
Example #3
Source File: GeoMap.java    From geowe-core with GNU General Public License v3.0 4 votes vote down vote up
public Map getMap() {
	return mapWidget.getMap();
}
 
Example #4
Source File: OpenLayersMapWrapper.java    From SensorWebClient with GNU General Public License v2.0 4 votes vote down vote up
public Map getMap() {
    return map;
}