[OpenLayers-Dev] Problem with strokeDashstyle and native browser of android

vanni vanni.casari at gmail.com
Sat May 21 06:08:19 EDT 2011


Hi all,
I try to change the style of line in a vector layer (for example dash style)
but in the android native browser the line is solid. The line don't change
the style never.
I try in mozilla on android and the line is ok (the style change correct)
The code is :

var styleDLine = new OpenLayers.Style(OpenLayers.Util.applyDefaults({
                    strokeColor: "blue",
                    fillOpacity :1,
                    strokeWidth: 4,
                    strokeDashstyle : "dash"
                }, OpenLayers.Feature.Vector.style["default"]));
               
                var styleLine = new OpenLayers.StyleMap(
                {
                        "default": styleDLine,
                        "select": new
OpenLayers.Style(OpenLayers.Util.applyDefaults({
                            fillOpacity : 1,
                            pointRadius: 30,
                            strokeWidth: 4
                        }, OpenLayers.Feature.Vector.style["select"]))
                });

//define rule for line
                var ruleAir = new OpenLayers.Rule({
                    filter: new OpenLayers.Filter.Comparison({
                          type: OpenLayers.Filter.Comparison.EQUAL_TO,
                          property: "icon",
                          value: 9
                      }),
                    symbolizer: {
                        strokeColor: "red",
                        fillOpacity :1,
                        pointRadius: 30,
                        strokeWidth: 4,
                        strokeDashstyle : "dash"
                    }
                });
               
                var ruleSub = new OpenLayers.Rule({
                    filter: new OpenLayers.Filter.Comparison({
                          type: OpenLayers.Filter.Comparison.EQUAL_TO,
                          property: "icon",
                          value: 13
                      }),
                    symbolizer: {
                        strokeColor: "red",
                        fillOpacity :1,
                        pointRadius: 30,
                        strokeWidth: 4,
                        strokeDashstyle : "solid"
                    }
                });
               
                var ruleMur = new OpenLayers.Rule({
                    filter: new OpenLayers.Filter.Comparison({
                          type: OpenLayers.Filter.Comparison.EQUAL_TO,
                          property: "icon",
                          value: 11
                      }),
                    symbolizer: {
                        strokeColor: "red",
                        fillOpacity :1,
                        pointRadius: 30,
                        strokeWidth: 4,
                        strokeDashstyle : "dashdot"
                    }
                });
               
                styleDLine.addRules([ruleAir, ruleSub, ruleMur]);

var layer$id = new OpenLayers.Layer.Vector('$desc',{
                            projection: sm,
                               styleMap: styleLevelsLine
                        });    


Thanks all.
Vanni

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Problem-with-strokeDashstyle-and-native-browser-of-android-tp6389125p6389125.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.


More information about the Dev mailing list