protected void setWmsLayerDefinition(final WmsLayerDefinition wmsLayerDefinition) { this.wmsLayerDefinition = wmsLayerDefinition; if (wmsLayerDefinition == null) { setExists(false); } else { setExists(true); final WmsClient wmsClient = wmsLayerDefinition.getWmsClient(); this.serviceUrl = wmsClient.getServiceUrl().toString(); final String layerTitle = wmsLayerDefinition.getTitle(); setName(layerTitle); this.layerName = wmsLayerDefinition.getName(); final long minimumScale = (long) wmsLayerDefinition.getMinimumScale(); super.setMinimumScale(minimumScale); final long maximumScale = (long) wmsLayerDefinition.getMaximumScale(); super.setMaximumScale(maximumScale); setBoundingBox(wmsLayerDefinition.getLatLonBoundingBox()); final GeometryFactory geometryFactory = wmsLayerDefinition.getDefaultGeometryFactory(); setGeometryFactory(geometryFactory); } }
@Override public void renderSelectedRecord( final Viewport2D viewport, final AbstractLayer layer, final LayerRecord object) { final AbstractRecordLayerRenderer renderer = getRenderer(viewport); if (renderer != null) { if (isVisible(object)) { try { renderer.renderSelectedRecord(viewport, layer, object); } catch (final Throwable e) { Logs.error( this, "Unabled to render " + layer.getName() + " #" + object.getIdentifier(), e); } } } }
@Override protected void refreshDo() { this.hasError = false; super.refreshDo(); }