[OpenLayers-Users] Add a layer as input with code of OpenLayers / GeoExt using GeoServer

Gpetr gkpetrak at gmail.com
Mon Feb 3 08:18:12 PST 2014


Hi,

I try to develop a GIS app with raster data. I have integrated the code of
the following openlayers example in my app.

http://dev.openlayers.org/releases/OpenLayers-2.13.1/examples/wps.html

I have built my app's interface, using the code from the following GeoExt's
example: http://api.geoext.org/1.1/examples/wms-tree.html

I have uploaded my raster data on GeoServer. The piece of code from the
openlayers' example that add the raster image in the input form is the
following:

function addRasterInput(input) {
    var name = input.identifier;
    var field = document.createElement("input");
    field.title = input["abstract"];
    var url = window.location.href.split("?")[0];
    field.value = url.substr(0, url.lastIndexOf("/")+1) +
"data/tazdem.tiff";
    document.getElementById("input").appendChild(field);
    (field.onblur = function() {
        input.reference = {
            mimeType: "image/tiff",
            href: field.value,
            method: "GET"
        };
    })();
}

I'm trying to modify the above code so that, when the user check a raster
image from the GeoServer Demo WMS, (the folder that includes retrieved data
from an xml GetCapabilities file and it is displayed to the left side of the
screen) to be added to the input form. 
Which is the right way to do this ?
Any ideas ?

Thank you in advance,
George




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Add-a-layer-as-input-with-code-of-OpenLayers-GeoExt-using-GeoServer-tp5101630.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list