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


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";
    (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 retrieve data from an xml GetCapabilities file and it is displayed to the left side of the screen) to be added to the input form.

How can I do this ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.