OpenLayers Help

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

OpenLayers Help

nSeixas
This post has NOT been accepted by the mailing list yet.
Hi,

I'm trying to make a html page and post there as a base layer my tiff raster file, and two shapefiles as overlayers...that files are at my GeoServer...
I can see everything at the layer switcher as you can see there...



However nothing appear in the map...
I try to make it as WMS and WFS nothing work...

My code:


OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;

        var map;

        function init(){


           var orto = new OpenLayers.Layer.WMS(
                "Orto Pinhão",
                "/geoserver/wms",
                {layers: 'Desenvolvimento:orto_pinhao',
                 format: 'image/png'}
            );

 /*     var casaswms = new OpenLayers.Layer.WMS(
                "Casas",
                "/geoserver/wms",
                {
                    layers: 'Desenvolvimento:casas',
                    transparent: 'true',
                    format: 'image/png',
                    }
            );

  var area_inundwms = new OpenLayers.Layer.WMS(
                "Área",
                "/geoserver/wms",
                {
                    layers: 'Desenvolvimento:area_inund',
                    transparent: 'true',
                    format: 'image/png',
                }
            );
*/

           var casas = new OpenLayers.Layer.WFS(
                "Casas",
                "/geoserver/wfs",
                {typename: 'Desenvolvimento:casas'},
                {
                    typename: 'casas',
                    featureNS: 'http://localhost:8080/Desenvolvimento',
                    extractAttributes: false,
                }
            );


            var area_inund = new OpenLayers.Layer.WFS(
                "Área Inundada",
                "/geoserver/wfs",
                {typename: 'Desenvolvimento:area_inund'},
                {
                    typename: 'area_inund',
                    featureNS: 'http://localhost:8080/Desenvolvimento',
                    extractAttributes: false
                }
            );
         
     
            map  = new OpenLayers.Map("map", {
                 projection: new OpenLayers.Projection("EPSG:900913"),
  units: "m",
    maxExtent: new OpenLayers.Bounds(48098.6652,164819.16,56098.6652,169825.9512168724),
    displayProjection: new OpenLayers.Projection("EPSG:3763"),
    });
                 
           
            map.addLayers([orto,casas,area_inund]);

            var panel = new OpenLayers.Control.Panel(
              {displayClass: 'olControlEditingToolbar'}
            );

     panel.addControls(
                [new OpenLayers.Control.Navigation(),
            new OpenLayers.Control.LayerSwitcher()
            ]);

            map.addControl(panel);
}

Any help??

Thank You So Much