Closed jobsonm closed 9 years ago
Resolved. Not sure what I've done but it seems to be working now. Not changed any of the code base or played around GeoServer but all I've got a map from a WMS. May be it was a good old fashioned reboot....
I am gglad you fixed it! I was not able to reproduce it... Could you poste the config or give a few hints in which direction you tried to change your GeoServer config?
Trying to use the OpenLayers (at v0.1.7) to load a image from a geoserver stored layer on my "localhost" PC. If I do a "layer Preview" within geoserver I get the following output:
Request: getMap Time = [] Format = image/png Filter = null Buffer = 0 Filters = null ValidateSchema = false Tiled = false FeatureVersion = null Transparent = false StyleFormat = sld SldBody = null Sld = null StyleUrl = null Crs = GEOGCS["WGS 84", DATUM["World Geodetic System 1984", SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4326"]] Bbox = SRSEnvelope[-2.1915973960504687 : -1.6000229379737738, 51.15011747003079 : 51.31302800327667] RemoteOwsType = null RemoteOwsURL = null Env = {} FormatOptions = {} Angle = 0.0 CQLFilter = null Elevation = [] FeatureId = null StartIndex = null ViewParams = null BgColor = java.awt.Color[r=255,g=255,b=255] TilesOrigin = null Palette = null SRS = EPSG:4326 Styles = [StyleImpl[ name=raster]] Layers = [org.geoserver.wms.MapLayerInfo@770c7188] MaxFeatures = null Width = 1198 Height = 330 Exceptions = SE_XML StyleBody = null SldVersion = null StyleVersion = null Version = 1.1.0 BaseUrl = http://localhost:8080/geoserver/ Request = GetMap RequestCharset = UTF-8 RawKvp = {REQUEST=GetMap, SRS=EPSG:4326, FORMAT=image/png, BBOX=-2.1915973960504687,51.15011747003079,-1.6000229379737738,51.31302800327667, VERSION=1.1.0, STYLES=, SERVICE=WMS, WIDTH=1198, HEIGHT=330, LAYERS=SPTA:spta} Get = true
If I use my Java code (listed at the bottom) I get the following output on the geoserver log file:
Request: getMap Time = [] Format = image/png Filter = null Buffer = 0 Filters = null ValidateSchema = false Tiled = false FeatureVersion = null Transparent = true StyleFormat = sld SldBody = null Sld = null StyleUrl = null Crs = GEOGCS["WGS 84", DATUM["World Geodetic System 1984", SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic latitude", NORTH], AXIS["Geodetic longitude", EAST], AUTHORITY["EPSG","4326"]] Bbox = SRSEnvelope[-121.46484375 : 121.46484375, -253.125 : 253.125] RemoteOwsType = null RemoteOwsURL = null Env = {} FormatOptions = {} Angle = 0.0 CQLFilter = null Elevation = [] FeatureId = null StartIndex = null ViewParams = null BgColor = java.awt.Color[r=255,g=255,b=255] TilesOrigin = null Palette = null SRS = urn:x-ogc:def:crs:EPSG:4326 Styles = [StyleImpl[ name=raster]] Layers = [org.geoserver.wms.MapLayerInfo@770c7188] MaxFeatures = null Width = 2880 Height = 1382 Exceptions = SE_XML StyleBody = null SldVersion = null StyleVersion = null Version = 1.3.0 BaseUrl = http://localhost:8080/geoserver/ Request = GetMap RequestCharset = UTF-8 RawKvp = {REQUEST=GetMap, FORMAT=image/png, CRS=EPSG:4326, BBOX=-121.46484375,-253.125,121.46484375,253.125, VERSION=1.3.0, STYLES=, SERVICE=WMS, WIDTH=2880, HEIGHT=1382, TRANSPARENT=true, LAYERS=SPTA:spta} Get = true
So everything is the same apart from the BBOX values. I could set the version to 1.1.0 but I still get the BBOX inconsistencies. My Java code is lised in it'sentirety below:
package com.qinetiq.training.web.aime.openlayers;
import gov.nasa.worldwind.ogc.wms.WMSCapabilities; import gov.nasa.worldwind.ogc.wms.WMSLayerCapabilities;
import java.io.File; import java.util.HashMap; import java.util.Map; import java.util.Vector;
import org.vaadin.addon.vol3.OLMap; import org.vaadin.addon.vol3.OLView; import org.vaadin.addon.vol3.OLViewOptions; import org.vaadin.addon.vol3.client.OLCoordinate; import org.vaadin.addon.vol3.client.Projections; import org.vaadin.addon.vol3.client.control.OLMousePositionControl; import org.vaadin.addon.vol3.client.control.OLScaleLineControl; import org.vaadin.addon.vol3.feature.OLFeature; import org.vaadin.addon.vol3.feature.OLGeometry; import org.vaadin.addon.vol3.feature.OLLineString; import org.vaadin.addon.vol3.feature.OLPoint; import org.vaadin.addon.vol3.layer.OLImageLayer; import org.vaadin.addon.vol3.layer.OLLayer; import org.vaadin.addon.vol3.layer.OLTileLayer; import org.vaadin.addon.vol3.source.OLImageWMSSource; import org.vaadin.addon.vol3.source.OLImageWMSSourceOptions; import org.vaadin.addon.vol3.source.OLSource; import org.vaadin.addon.vol3.source.OLVectorSource;
import aimeJava.generic.AimeLogger; import aimeJava.generic.DataHolder; import aimeJava.generic.FomDataItem; import aimeJava.rpr.BaseEntity; import aimeJava.rpr.EntityID; import aimeJava.rpr.RprProperties;
import com.qinetiq.training.web.aime.AimeWebServlet; import com.qinetiq.training.web.aime.MilStd2525; import com.qinetiq.training.web.aime.app.AbstractApplicationRuntimeDisplay; import com.qinetiq.training.web.aime.app.QinetiQApplicationBaseUI; import com.qinetiq.training.web.aime.utilities.coordinates.LatLonAltPoint; import com.vaadin.tapio.googlemaps.GoogleMap; import com.vaadin.tapio.googlemaps.client.LatLon; import com.vaadin.tapio.googlemaps.client.events.MapMoveListener; import com.vaadin.tapio.googlemaps.client.overlays.GoogleMapMarker; import com.vaadin.ui.AbstractLayout; import com.vaadin.ui.Alignment; import com.vaadin.ui.Button; import com.vaadin.ui.HorizontalLayout; import com.vaadin.ui.Notification; import com.vaadin.ui.VerticalLayout;
@SuppressWarnings("serial") public class AimeOpenLayersRuntimeDisplay extends AbstractApplicationRuntimeDisplay implements BaseEntity.CreationListener, BaseEntity.UpdateListener, MapMoveListener { private OLMap map; // private OLTileLayer baseLayer; // private OLLayer baseLayer; // private OLVectorLayer vectorLayer;
}
Note I've comment out the default TileLayer (which does work) and renders a Internet source map. If I use my createImageLayer(createImageSource()) implementation then --> No map.
Is it a bug? or a PICINC? Any help would be very greatly appreciated.
Mike