Wednesday 27 March 2019

geoserver - How to avoid Pink tiles when DB view/Table is empty?


I have views that are spatial in a sense that they select some spatial column from other table. This table is published using geoserver. This table is live and sometime has no data at all. When the table has no data the wms displayed is all red and error in firebug console is: enter image description here


The WMS returned:


>  > ServiceExceptionReport SYSTEM
> "http://192.168.70.65:80/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd">

> java.lang.NullPointerException
> null
>


The Code:


function init(){    
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 1;
OpenLayers.Util.onImageLoadErrorColor = "transparent";

map = new OpenLayers.Map('map', {

projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326"),
numZoomLevels: 21,
maxExtent: new OpenLayers.Bounds(-20037508, -20037508,20037508, 20037508.34),
controls: [
new OpenLayers.Control.Navigation(),
new OpenLayers.Control.PanZoomBar(),
new OpenLayers.Control.LayerSwitcher({'ascending':false}),
new OpenLayers.Control.ScaleLine(),
new OpenLayers.Control.MousePosition(),

new OpenLayers.Control.OverviewMap(),
new OpenLayers.Control.KeyboardDefaults()
]


});

Using GeoExt:














arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...