[OpenLayers-Users] HELP!!! How implement Filter in WMS Layer

fsalas fsalas at geocuba.cu
Fri Sep 18 09:39:45 EDT 2009


Arn ,
Thanks, for your cooperation,
 I atached my map file , I need that you send my yours oppinion about.

************************
MAP
  NAME "Sistema Informativo"
  STATUS ON
  EXTENT 253600 328400 301800 355300
  SIZE 450 300
  SYMBOLSET "./etc/symbols.sym"
  FONTSET "./etc/fonts.txt"
  IMAGETYPE PNG
  IMAGECOLOR 246 245 236
  UNITS meters
  #Start of web interface definition
  WEB
    IMAGEPATH "/ms4w/tmp/ms_tmp/"
    IMAGEURL "/ms_tmp/"
    MINSCALE 4e+02
    MAXSCALE 4e+02
  END
  METADATA
  "wms_srs""epsg:2085"
  "wms_format""image/png"
  END
  #Start of reference object(keymap)
  REFERENCE
    STATUS On
    IMAGE "images/keymap.png"
    SIZE 100 75
    EXTENT 246000 323100 312000 360500
    COLOR -1 -1 -1
    OUTLINECOLOR 255 0 0
    MINBOXSIZE 3
    MAXBOXSIZE 0
    MARKER 0
    MARKERSIZE 0
  END
  #Start of legend definitions
  LEGEND
    STATUS OFF
  END
  #Start of scalebar object
  SCALEBAR
    STATUS ON
    COLOR 255 255 255
    OUTLINECOLOR 0 0 0
    BACKGROUNDCOLOR 0 0 0
    IMAGECOLOR 255 255 255
    UNITS meters
    INTERVALS 3
    SIZE 150 5
    STYLE 0
    POSITION LL
    LABEL
      TYPE BITMAP
      SIZE SMALL
      OFFSET 0 0
      BUFFER 0
      MINDISTANCE -1
      MINFEATURESIZE -1
      COLOR 0 0 0
      PARTIALS TRUE
      FORCE FALSE
    END
  END
  SYMBOL
    NAME "arrow"
    TYPE TRUETYPE
    FILLED true
    ANTIALIAS true
    CHARACTER "→"
    FONT "arial"
    GAP -50
  END
  #Start of OutputFormat object
  OUTPUTFORMAT
    NAME "png"
    MIMETYPE "image/png"
    DRIVER "GD/PNG"
    EXTENSION "png"
    IMAGEMODE PC256
    TRANSPARENT FALSE
  END
  #Start of layer definitions
LAYER
NAME "Municipios"
GROUP "Mapa"
STATUS on
CONNECTIONTYPE POSTGIS
CONNECTION "dbname=dbeducacion user=postgres password=postgres 
host=localhost"
DATA "the_geom from municipios USING UNIQUE gid"
TYPE POLYGON
TOLERANCE 3
CLASS
NAME "Municipios"
TEMPLATE "query.phtml"
STYLE
COLOR 225 221 191
OUTLINECOLOR 0 0 0
MINSIZE 1
MAXSIZE 100
END
END
END
LAYER
NAME "Carretera"
GROUP "Mapa"
STATUS on
CONNECTIONTYPE POSTGIS
CONNECTION "dbname=dbeducacion user=postgres password=postgres 
host=localhost"
DATA "the_geom from carreteras USING UNIQUE gid"
TYPE LINE
TOLERANCE 3
CLASS
NAME "Carretera"
TEMPLATE "query.phtml"
STYLE
COLOR 0 0 0
OUTLINECOLOR 0 0 0
MINSIZE 1
MAXSIZE 100
END
END
END
END #Fin del MapFile
****************************

The problem persist

Regards, salas


----- Original Message ----- 
From: "Arnd Wippermann" <arnd.wippermann at web.de>
To: "'fsalas'" <fsalas at geocuba.cu>
Cc: <users at openlayers.org>
Sent: Thursday, September 17, 2009 5:20 PM
Subject: AW: [OpenLayers-Users] HELP!!! How implement Filter in WMS Layer


Hi salas,

It seems, your mapfile is not configured for EPSG:2085. There must be a line
in the WEB META Block like
    'wms_srs' 'EPSG:2085 EPSG:4326 EPSG:900913 ' for the projection, you
wich to support.

Arnd

-----Ursprüngliche Nachricht-----
Von: fsalas [mailto:fsalas at geocuba.cu]
Gesendet: Donnerstag, 17. September 2009 23:31
An: Arnd Wippermann
Cc: users at openlayers.org
Betreff: Re: [OpenLayers-Users] HELP!!! How implement Filter in WMS Layer
Wichtigkeit: Hoch

Arnd,

Thanks for yours answer,

I was testing the example and I think that can be my solution but when i
translate to my code see below

function init(){
  map = new OpenLayers.Map( 'map',{maxExtent:new
OpenLayers.Bounds(25.3600,32.8400,30.1800,35.5300),projection:
"EPSG:2085"});
             // setup single tiled layer

       mun = new OpenLayers.Layer.WMS( "Cuba",

"http://urano/cgi-bin/mapserv.exe?map=../htdocs/educacion/mapfile/educacion.
map",
                    {   "layers": "Municipios",
                        "format": "image/png",
       "src": 'EPSG:2085',
                        "transparent": "TRUE"
                    });

      mun.isBaseLayer=true;
            map.addLayers([mun]);

            // setup controls and initial zooms
            map.addControl(new OpenLayers.Control.PanZoomBar());
            map.addControl(new OpenLayers.Control.Navigation());
            map.addControl(new OpenLayers.Control.Scale($('scale')));
            map.addControl(new OpenLayers.Control.MousePosition({element:
$('location')}));
            map.addControl(new OpenLayers.Control.LayerSwitcher());
            map.zoomToExtent(map.maxExtent);
        }

*******   This is the error inside openlayer maps in the page :********

msWMSLoadGetMapParams() : WMS server error

- Invalid src given : src must be valid or all requested layers

**********************

Regards , salas







----- Original Message -----
From: "Arnd Wippermann" <arnd.wippermann at web.de>
To: "'fsalas'" <fsalas at geocuba.cu>
Cc: <users at openlayers.org>
Sent: Wednesday, September 16, 2009 4:49 PM
Subject: AW: [OpenLayers-Users] HELP!!! How implement Filter in WMS Layer


Hi,

An example to show the use of SLD and SLD_BODY to change the style for WMS
layers:
http://gis.ibbeck.de/OLClient/examples/wms_world.asp

The WMS comes from MapServer.

Arnd


-----Ursprüngliche Nachricht-----
Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von fsalas
Gesendet: Mittwoch, 16. September 2009 22:38
An: Ian Turton
Cc: users at openlayers.org
Betreff: Re: [OpenLayers-Users] HELP!!! How implement Filter in WMS Layer

Greetings Ian Turton.

I´m was checking all that you send me, but I am not sure that it is my real
problem.

That you help me with some example or other thing for to filter one layer
WMS with SLD or SLD_BODY?

----- Original Message -----
From: "Ian Turton" <ijturton at gmail.com>
To: "fsalas" <fsalas at geocuba.cu>
Cc: "Andreas Hocevar" <ahocevar at opengeo.org>; <users at openlayers.org>
Sent: Tuesday, September 15, 2009 9:43 AM
Subject: Re: [OpenLayers-Users] HELP!!! How implement Filter in WMS Layer


> did you try not encoding the SLD in the function body? - it's possible
> that it is being encoded twice and thus makes no sense at the server
> end.
> -- 
> Ian Turton
>
> Sent from State College, PA, United States
>


___________________________________
Dirección de Comunicaciones
Grupo Empresarial GEOCUBA
Este mensaje esta libre de virus.
Revisado por Kaspersky Antivirus
----------------------------------------------------------------------
Definition count:  2582944
Definition date:  9/16/2009
SecurityPlus version: 3.0.5



_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users



___________________________________
Dirección de Comunicaciones
Grupo Empresarial GEOCUBA
Este mensaje esta libre de virus.
Revisado por Kaspersky Antivirus
----------------------------------------------------------------------
Definition count:  2587297
Definition date:  9/17/2009
SecurityPlus version: 3.0.5





___________________________________
Dirección de Comunicaciones
Grupo Empresarial GEOCUBA
Este mensaje esta libre de virus. 
Revisado por Kaspersky Antivirus
----------------------------------------------------------------------
Definition count:  2596814
Definition date:  9/18/2009
SecurityPlus version: 3.0.5






More information about the Users mailing list