Monday, September 17, 2007

How to create a dashed line ?

This code is based on the great work from Eli. You can download all the source code from here. So... in mxml it will look like this:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
xmlns:map="com.esri.aws.awx.map.*"
xmlns:framework="com.esri.aws.osgi.framework.*"
xmlns:layers="com.esri.aws.awx.map.layers.*"
xmlns:style="com.esri.aws.awx.map.layers.overlays.style.*"
xmlns:overlays="com.esri.aws.awx.map.layers.overlays.*"
xmlns:geom="flash.geom.*"
>
<framework:Framework/>
<map:Map>
<map:basemaps>
<layers:PolylineLayer>
<layers:style>
<style:StrokeStyle>
<style:stroke>
<mx:Stroke color="0xFF0000" alpha="0.5" weight="5" caps="round"/>
</style:stroke>
<style:pattern>
<mx:Number>10</mx:Number>
<mx:Number>10</mx:Number>
</style:pattern>
</style:StrokeStyle>
</layers:style>
<overlays:Polyline>
<overlays:coords>
<geom:Point y="0" x="0"/>
<geom:Point y="45" x="-90"/>
<geom:Point y="-45" x="-90"/>
</overlays:coords>
</overlays:Polyline>
</layers:PolylineLayer>
</map:basemaps>
</map:Map>
</mx:Application>

No comments: