added set scope
This commit is contained in:
parent
ab8119be2e
commit
6c495119b9
|
@ -23,6 +23,9 @@ import ol.layer.Tile;
|
||||||
import ol.layer.VectorLayerOptions;
|
import ol.layer.VectorLayerOptions;
|
||||||
import ol.proj.Projection;
|
import ol.proj.Projection;
|
||||||
import ol.proj.ProjectionOptions;
|
import ol.proj.ProjectionOptions;
|
||||||
|
import ol.source.ImageWms;
|
||||||
|
import ol.source.ImageWmsOptions;
|
||||||
|
import ol.source.ImageWmsParams;
|
||||||
import ol.source.Osm;
|
import ol.source.Osm;
|
||||||
import ol.source.XyzOptions;
|
import ol.source.XyzOptions;
|
||||||
import ol.style.FillOptions;
|
import ol.style.FillOptions;
|
||||||
|
@ -152,6 +155,35 @@ import ol.style.Style;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds the WMS layer.
|
||||||
|
*
|
||||||
|
* @param mapServerHost the map server host
|
||||||
|
* @param layerName the layer name
|
||||||
|
*/
|
||||||
|
public void addWMSLayer(String mapServerHost, String layerName) {
|
||||||
|
|
||||||
|
ImageWmsParams imageWMSParams = OLFactory.createOptions();
|
||||||
|
imageWMSParams.setLayers(layerName);
|
||||||
|
|
||||||
|
ImageWmsOptions imageWMSOptions = OLFactory.createOptions();
|
||||||
|
imageWMSOptions.setUrl(mapServerHost);
|
||||||
|
imageWMSOptions.setParams(imageWMSParams);
|
||||||
|
//imageWMSOptions.setRatio(1.5f);
|
||||||
|
|
||||||
|
ImageWms imageWMSSource = new ImageWms(imageWMSOptions);
|
||||||
|
|
||||||
|
LayerOptions layerOptions = OLFactory.createOptions();
|
||||||
|
layerOptions.setSource(imageWMSSource);
|
||||||
|
|
||||||
|
ol.layer.Image wmsLayer = new ol.layer.Image(layerOptions);
|
||||||
|
|
||||||
|
//visibleLayerItems
|
||||||
|
|
||||||
|
map.addLayer(wmsLayer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void addPoint(Coordinate coordinate) {
|
public void addPoint(Coordinate coordinate) {
|
||||||
|
|
||||||
if(geometryLayer!=null) {
|
if(geometryLayer!=null) {
|
||||||
|
|
|
@ -121,6 +121,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
|
||||||
|
|
||||||
try {
|
try {
|
||||||
LOG.info("Trying to get record for id "+id);
|
LOG.info("Trying to get record for id "+id);
|
||||||
|
SessionUtil.getCurrentContext(this.getThreadLocalRequest(), true);
|
||||||
AbstractRecordManager<Record> abmRecord = ManagerFactory.getByRecordID(id);
|
AbstractRecordManager<Record> abmRecord = ManagerFactory.getByRecordID(id);
|
||||||
LOG.info("Got record for id "+id);
|
LOG.info("Got record for id "+id);
|
||||||
Record record = abmRecord.getRecord();
|
Record record = abmRecord.getRecord();
|
||||||
|
|
Loading…
Reference in New Issue