Mercurial > dive4elements > river
view flys-client/src/main/java/de/intevation/flys/client/client/ui/map/FloodMap.java @ 798:7061c2e66039
Finished layouting the map components.
flys-client/trunk@2317 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 11 Jul 2011 10:21:16 +0000 |
parents | cc3f481e9484 |
children | f4299b90c996 |
line wrap: on
line source
package de.intevation.flys.client.client.ui.map; import org.gwtopenmaps.openlayers.client.Map; import org.gwtopenmaps.openlayers.client.MapOptions; import org.gwtopenmaps.openlayers.client.MapWidget; import org.gwtopenmaps.openlayers.client.control.Navigation; import org.gwtopenmaps.openlayers.client.util.JObjectArray; import org.gwtopenmaps.openlayers.client.util.JSObject; public class FloodMap { protected MapWidget mapWidget; protected Map map; public FloodMap() { MapOptions opts = new MapOptions(); opts.setControls(new JObjectArray(new JSObject[] {})); opts.setNumZoomLevels(16); opts.setProjection(getRiverProjection()); mapWidget = new MapWidget("510px", "635px", opts); map = mapWidget.getMap(); initControls(); } protected void initControls() { map.addControl(new Navigation()); } public MapWidget getMapWidget() { return mapWidget; } public Map getMap() { return map; } public String getRiverProjection() { return "EPSG:4326"; } public void setSize(String width, String height) { mapWidget.setWidth(width); mapWidget.setHeight(height); } }