Skip to main content
edited tags
Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345
deleted 9 characters in body
Source Link
</head>
<body onload="init()">
    <div id='banner' style='width: 51%; height: 50px; background-color: #A52A2A; border-top-left-radius: 9px; border-top-right-radius: 9px; text-align: center; font-size: 25px; '>
    <div id="text" style='color: white; font-family: tahoma; line-height:50px;'> Projet Géod'Air<Projet</div>
    </div>
    <div id='map' style='width: 51%; height: 500px; float: bottom;'>                                
    </div>
    <div id='button1' style='display: inline-block; margin-top: 1%; width: 10%; height: 50px; background-color: #32CD32; border-radius: 15px;'>
    <div id='txt1' style='text-align: center; font-family: tahoma; color: white; font-size: 25px; line-height: 49px;'>Station 1</div>
    </div>

    <script> 
    $( "#button1" ).click(function() {
        //Put the logical filter there  
    });
    </script>
</body>
station = new OpenLayers.Layer.Vector("station", {
        strategies: [new OpenLayers.Strategy.BBOX()],
        protocol: new OpenLayers.Protocol.WFS({
            version: "1.0.0",
            url:  "http://129585.182.247555.82/sig/geoserver/wfs",
            featureType: "station_de_mesure""station",
            srsName:"EPSG:2154",
            featureNS: "http://www.obx.com/zodb",
            geometryName: "geom"
        }),
</head>
<body onload="init()">
    <div id='banner' style='width: 51%; height: 50px; background-color: #A52A2A; border-top-left-radius: 9px; border-top-right-radius: 9px; text-align: center; font-size: 25px; '>
    <div id="text" style='color: white; font-family: tahoma; line-height:50px;'> Projet Géod'Air</div>
    </div>
    <div id='map' style='width: 51%; height: 500px; float: bottom;'>                                
    </div>
    <div id='button1' style='display: inline-block; margin-top: 1%; width: 10%; height: 50px; background-color: #32CD32; border-radius: 15px;'>
    <div id='txt1' style='text-align: center; font-family: tahoma; color: white; font-size: 25px; line-height: 49px;'>Station 1</div>
    </div>

    <script> 
    $( "#button1" ).click(function() {
        //Put the logical filter there  
    });
    </script>
</body>
station = new OpenLayers.Layer.Vector("station", {
        strategies: [new OpenLayers.Strategy.BBOX()],
        protocol: new OpenLayers.Protocol.WFS({
            version: "1.0.0",
            url:  "http://129.182.247.82/sig/geoserver/wfs",
            featureType: "station_de_mesure",
            srsName:"EPSG:2154",
            featureNS: "http://www.obx.com/zodb",
            geometryName: "geom"
        }),
</head>
<body onload="init()">
    <div id='banner' style='width: 51%; height: 50px; background-color: #A52A2A; border-top-left-radius: 9px; border-top-right-radius: 9px; text-align: center; font-size: 25px; '>
    <div id="text" style='color: white; font-family: tahoma; line-height:50px;'> Projet</div>
    </div>
    <div id='map' style='width: 51%; height: 500px; float: bottom;'>                                
    </div>
    <div id='button1' style='display: inline-block; margin-top: 1%; width: 10%; height: 50px; background-color: #32CD32; border-radius: 15px;'>
    <div id='txt1' style='text-align: center; font-family: tahoma; color: white; font-size: 25px; line-height: 49px;'>Station 1</div>
    </div>

    <script> 
    $( "#button1" ).click(function() {
        //Put the logical filter there  
    });
    </script>
</body>
station = new OpenLayers.Layer.Vector("station", {
        strategies: [new OpenLayers.Strategy.BBOX()],
        protocol: new OpenLayers.Protocol.WFS({
            version: "1.0.0",
            url:  "http://585.182.555.82/sig/geoserver/wfs",
            featureType: "station",
            srsName:"EPSG:2154",
            featureNS: "http://www.obx.com/zodb",
            geometryName: "geom"
        }),
added 231 characters in body
Source Link

You've understood it, my aim is to use the OpenLayers.Filter.Logical into the jQuery function. I think I have to use something like this : station.filter = new OpenLayers.Filter.Logical({ But I'm not sure how.

If I do

<script> // Go jQuery Go !
$( "#button1" ).click(function() {
  alert(station.filter.filters[0].value);
});
</script>

It's working (it's returning me "2", as according the logical filter)

You've understood it, my aim is to use the OpenLayers.Filter.Logical into the jQuery function. I think I have to use something like this : station.filter = new OpenLayers.Filter.Logical({ But I'm not sure.

You've understood it, my aim is to use the OpenLayers.Filter.Logical into the jQuery function. I think I have to use something like this : station.filter = new OpenLayers.Filter.Logical({ But I'm not sure how.

If I do

<script> // Go jQuery Go !
$( "#button1" ).click(function() {
  alert(station.filter.filters[0].value);
});
</script>

It's working (it's returning me "2", as according the logical filter)

Source Link
Loading