1

where did i get miss up?!

here is my code inside the mapfile.map

               LAYER 
                NAME "layername"
                STATUS OFF
                TYPE RASTER
                DATA "data/sample.tif"
               END

the code inside explorer.js from where i declare the openlayers.layer.wms

    var showlayer = new OpenLayers.Layer.WMS(
        "my Layer Title", 
         my_url, 
        {
            layers: 'layername',
            'format':'image/tiff'

        },{
            singleTile: false,
            maxExtent: my_MapExtent,
            isBaseLayer: false

   })

           map.addLayer(showlayer);

when i open it in the browser here the error show's: msWMSLoadGetMapParams(): WMS server error. Invalid layer(s)

any help or suggestion for this one?...

  • Try first what happens with STATUS ON. – user30184 Dec 3 '14 at 7:45
  • @user30184 i already turn it on and off and still the same error message. – blinddevil Dec 3 '14 at 7:54
  • Try then to remove quotes around parameter format. See how transparent is used in dev.openlayers.org/docs/files/OpenLayers/Layer/WMS-js.html. But you should really use Firebug etc. so you can see what requests your application is sending. – user30184 Dec 3 '14 at 8:11
  • @user30184 i deed remove it like format: 'image/tiff' but still no hope. – blinddevil Dec 3 '14 at 8:15
  • There is always hope. People do use MapServer with OpenLayers. Don't guess, find the actual GetMap that is generated. You will see what is wrong and then will know where to fix. – user30184 Dec 3 '14 at 8:18

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.