Using DisplayObjectMarker to create my own style

37 views
Skip to first unread message

diego

unread,
Jan 4, 2013, 8:11:30 AM1/4/13
to opensca...@googlegroups.com
Hi all. I'm trying to use my own image to display points on a map. This is what I'm doing:

                var lStyle           :Style = new Style();
                var lRule            :Rule = new Rule();
                var lSymbolizer  :PointSymbolizer = new PointSymbolizer (new DisplayObjectMarker (assets.Images.MyMapPin));
           
                lRule.symbolizers.push (lSymbolizer);
                lStyle.rules.push (lRule);
                myLayer.style = lStyle;
                myMap.map.addLayer (myLayer);

The thing is that what is showinng is the default point style (OpenScales' default blue pin). According to the debugger, the only style applied is the style I created. What am I missing?

Diego


Reply all
Reply to author
Forward
0 new messages