Hi,

I think I've found something. I'm using my layer in order to show different 
kind of features (points, lines, polygons) loaded with an Ajax process and also 
I use it to save data through a WFS-T service. So, when I set a protocol and a 
strategy to the layer I get this confusing behaviour but if I don't set those 
properties, everything works fine.

I'll change some parts of the application's code to make it work.

Just to let you know.  
 
Regards,

Un saludo,
 
··················································································

David Alda Fernández de Lezea
Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad
 
IKT
Granja Modelo s/n · 01192 · Arkaute (Araba)

··················································································
Tlfnos.: 945-00-32-95                         Fax: 945-00.32.90
··················································································
email: [email protected]                                web: www.ikt.es
··················································································

-----Mensaje original-----
De: [email protected] 
[mailto:[email protected]] En nombre de David Alda 
Fernandez de Lezea
Enviado el: miércoles, 08 de junio de 2011 9:10
Para: [email protected]
Asunto: RE: [OpenLayers-Users] Problems displaying points with rule basedstyle

Hi,

I'm adding 500 points, I know they are a lot of points, but before modifying my 
layer style to use rules (a use a now a mapstyle), they were properly added, 
but now not.

What could be the difference?

Thanks.
 
 
Un saludo,
 
··················································································

David Alda Fernández de Lezea
Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad
 
IKT
Granja Modelo s/n · 01192 · Arkaute (Araba)

··················································································
Tlfnos.: 945-00-32-95                         Fax: 945-00.32.90
··················································································
email: [email protected]                                web: www.ikt.es
··················································································

-----Mensaje original-----
De: [email protected] 
[mailto:[email protected]] En nombre de David Alda 
Fernandez de Lezea Enviado el: martes, 31 de mayo de 2011 10:15
Para: [email protected]
Asunto: RE: [OpenLayers-Users] Problems displaying points with rule basedstyle

 
Sorry for the double posting, it was a mistake.

-----Mensaje original-----
De: [email protected] 
[mailto:[email protected]] En nombre de David Alda 
Fernandez de Lezea Enviado el: martes, 31 de mayo de 2011 9:24
Para: [email protected]
Asunto: RV: [OpenLayers-Users] Problems displaying points with rule basedstyle

Any ideas? 

I think I'm using OpenLayers 2.9 and this behaviour is happening in IE8.
 
 
Un saludo,
 
··················································································

David Alda Fernández de Lezea
Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad
 
IKT
Granja Modelo s/n · 01192 · Arkaute (Araba)

··················································································
Tlfnos.: 945-00-32-95                         Fax: 945-00.32.90
··················································································
email: [email protected]                                web: www.ikt.es
··················································································

-----Mensaje original-----
De: [email protected] 
[mailto:[email protected]] En nombre de David Alda 
Fernandez de Lezea Enviado el: lunes, 11 de abril de 2011 13:27
Para: [email protected]
Asunto: [OpenLayers-Users] Problems displaying points with rule based style


Hi list,

I'm trying to display some points in a Vector Layer that has a style map 
defined. My layer's style map is:

var styles = new OpenLayers.StyleMap({
                "default": new OpenLayers.Style(null, {
                    rules: [
                        new OpenLayers.Rule({
                            symbolizer: {
                                "Point": {
                                    pointRadius: 5,
                                    graphicName: "circle",
                                    fillColor: "#FFA500",
                                    fillOpacity: 0.25,
                                    strokeWidth: 1,
                                    strokeOpacity: 1,
                                    strokeColor: "#FFA500"
                                },
                                "Line": {
                                    strokeWidth: 3,
                                    strokeOpacity: 1,
                                    strokeColor: "#FFA500"
                                },
                                "Polygon": {
                                    strokeWidth: 2,
                                    strokeOpacity: 1,
                                    strokeColor: "#FFA500",
                                    fillColor: "#FFA500"
                                }
                            }
                        })
                    ]
                }),
                "select": new OpenLayers.Style({
                    strokeColor: "#00ccff",
                    strokeWidth: 4,
                                        strokeDashstyle: "solid"
                }),
                "temporary": new OpenLayers.Style(null, {
                    rules: [
                        new OpenLayers.Rule({
                            symbolizer: {
                                "Point": {
                                    pointRadius: 5,
                                    graphicName: "square",
                                    fillColor: "white",
                                    fillOpacity: 0.25,
                                    strokeWidth: 1,
                                    strokeOpacity: 1,
                                    strokeColor: "#333333"
                                },
                                "Line": {
                                    strokeWidth: 3,
                                    strokeOpacity: 1,
                                    strokeColor: "#00ccff"
                                },
                                "Polygon": {
                                    strokeWidth: 2,
                                    strokeOpacity: 1,
                                    strokeColor: "#0000ff",
                                    fillColor: "#0000ff"
                                }

                            }
                        })
                    ]
                })
            });

And I add my points doing:

var coords = pto.getCoords().split(",");
                                        
var pointStyle ={
        pointRadius: pto.getGrosor(),
        fillOpacity: 1, 
        strokeOpacity: 1, 
        strokeColor: "black",
        label: pto.getLabelText(),
        labelAlign: "rt",
        strokeWidth: 1, 
        fillColor: "#" + pto.getColor(), 
        graphicName: pto.getTipo(), 
        fontColor: "#" + pto.getLabelColor(),
        fontSize: pto.getLabelSize(),
        fontWeight: "bold"
};

var feat = new OpenLayers.Feature.Vector(new 
OpenLayers.Geometry.Point(coords[0],coords[1]));

feat.attributes["id"] = pto.getID();
feat.fid = "punto." + pto.getCoords();
feat.state = OpenLayers.State.INSERT;
//feat.renderIntent = "default";

var rule = new OpenLayers.Rule({
        filter: new OpenLayers.Filter.Comparison({
                type: OpenLayers.Filter.Comparison.EQUAL_TO,
                property: "id",
                value: pto.getID()
        }),
        symbolizer: pointStyle
});
pila.styleMap.styles["default"].addRules([rule, new 
OpenLayers.Rule({elseFilter: true})]);

vectorLayer.addFeatures([feat]);

It's strange because they appear just for one second and suddenly they 
disappear from the layer!! Has anyone noticed something like this??
 
Thanks.

Regards,
 
Un saludo,
 
··················································································

David Alda Fernández de Lezea
Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad
 
IKT
Granja Modelo s/n · 01192 · Arkaute (Araba)

··················································································
Tlfnos.: 945-00-32-95                         Fax: 945-00.32.90
··················································································
email: [email protected]                                web: www.ikt.es
··················································································
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to