Mercurial > dive4elements > river
view flys-client/src/main/java/de/intevation/flys/client/client/ui/map/FloodMap.java @ 797:cc3f481e9484
Introduced GwtOpenLayers to bring up maps.
flys-client/trunk@2314 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 08 Jul 2011 14:56:02 +0000 |
parents | |
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); } }