Select to view content in your preferred language

Problem with SimpleLineSymbol in API 3

1062
4
Jump to solution
10-18-2012 12:55 AM
KarolKarol
Emerging Contributor
Hello,
i am trying to migrate to api 3 from 2.5 and I have problem with SimpleLineSymbol. When I try to apply other line style than 'solid' the error is thrown:

ReferenceError: Error #1069: Property setTo not found on flash.geom.Point, and there is no default value

The problems occurs also on sample code 'LineWizard' but with OSM map.

<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"                xmlns:mx="library://ns.adobe.com/flex/mx"                xmlns:esri="http://www.esri.com/2008/ags"                xmlns:s="library://ns.adobe.com/flex/spark"                pageTitle="Play with Polyline symbols">      <fx:Script>         <![CDATA[             private function toHex(item:Number):String             {                 var hex:String = item.toString(16);                 return ("00000" + hex.toUpperCase()).substr(-6);             }         ]]>     </fx:Script>      <fx:Declarations>         <esri:SimpleLineSymbol id="mySymbol"                                width="{lineWidth.value}"                                alpha="{lineAlpha.value}"                                color="{lineColor.selectedColor}"                                style="{lineStyle.selectedItem}"/>      </fx:Declarations>      <esri:Map>          <esri:OpenStreetMapLayer />         <esri:GraphicsLayer>             <esri:Graphic symbol="{mySymbol}" toolTip="Change this polyline using the top Wizard on the right">                 <esri:geometry>                     <esri:Polyline spatialReference="{new SpatialReference(102100)}">                         <fx:Array>                             <fx:Array>                                 <esri:MapPoint id="Tokyo"                                                x="15558700" y="4259400"/>                                 <esri:MapPoint id="Beijing"                                                x="12959100" y="4851401"/>                                 <esri:MapPoint id="UlanBator"                                                x="11901900" y="6093100"/>                                 <esri:MapPoint id="Malmo"                                                x="1447100" y="7477200"/>                                 <esri:MapPoint id="SanFrancisco"                                                x="-13627100" y="4548900"/>                                 <esri:MapPoint id="SantaBarbara"                                                x="-13330400" y="4086500"/>                             </fx:Array>                         </fx:Array>                     </esri:Polyline>                 </esri:geometry>             </esri:Graphic>         </esri:GraphicsLayer>     </esri:Map>     <mx:Panel right="5" top="5"               horizontalAlign="right"               paddingBottom="0"               paddingTop="0"               title="Simple Line Properties">         <mx:Form alpha="0.8"                  backgroundColor="0xEEEEEE"                  paddingBottom="5"                  paddingTop="5">             <mx:FormItem label="Color">                 <mx:ColorPicker id="lineColor" selectedColor="0x009966"/>             </mx:FormItem>             <mx:FormItem label="Width:">                 <s:HSlider id="lineWidth"                            width="100"                            liveDragging="true"                            maximum="20"                            minimum="0"                            snapInterval="1"                            value="8"/>             </mx:FormItem>             <mx:FormItem label="Alpha:">                 <s:HSlider id="lineAlpha"                            width="100"                            liveDragging="true"                            maximum="1"                            minimum="0"                            snapInterval="0.01"                            value="1"/>             </mx:FormItem>             <mx:FormItem label="Style:">                 <s:DropDownList id="lineStyle"                                 top="35"                                 cornerRadius="0"                                 fontWeight="normal"                                 horizontalCenter="0"                                 selectedIndex="4">                     <s:ArrayList>                         <fx:String>dash</fx:String>                         <fx:String>dashdot</fx:String>                         <fx:String>dashdotdot</fx:String>                         <fx:String>dot</fx:String>                         <fx:String>solid</fx:String>                     </s:ArrayList>                 </s:DropDownList>             </mx:FormItem>         </mx:Form>     </mx:Panel>          <s:Panel width="90%" height="60"              bottom="70"              backgroundColor="#D3D1D1"              borderAlpha="0.8"              horizontalCenter="0"              maxWidth="600"              title="mxml for Simple Line symbol">         <s:layout>             <s:HorizontalLayout horizontalAlign="center"                                 paddingBottom="0"                                 paddingLeft="0"                                 paddingRight="0"                                 paddingTop="0"/>         </s:layout>         <mx:TextArea width="100%" height="100%"                      condenseWhite="true"                      paddingBottom="0"                      paddingLeft="0"                      paddingRight="0"                      paddingTop="0">             <mx:htmlText>                 &amp;lt;esri:SimpleLineSymbol color=&quot;0x{toHex(lineColor.selectedColor)}&quot; width=&quot;{lineWidth.value}&quot; alpha=&quot;{lineAlpha.value}&quot; style=&quot;{lineStyle.selectedItem}&quot; /&amp;gt;             </mx:htmlText>         </mx:TextArea>     </s:Panel>  </s:Application>


Any ideas?
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
IvanBespalov
Frequent Contributor
answer to your question is here
ArcGIS API 3.0 (final) for Flex
... 
Requires Adobe Flex 4.6 SDK or higher, which in turn requires at least Flash Player 11.1. 
...


Post with link to download Adobe SDK 4.6

View solution in original post

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
Karol,

   So you have the AGS Flex API 3.0 swc in your projects libs folder and doe not have any other older version of the AGS Flex API swc in there right?
0 Kudos
KarolKarol
Emerging Contributor
Karol,

   So you have the AGS Flex API 3.0 swc in your projects libs folder and doe not have any other older version of the AGS Flex API swc in there right?


Yes, there is only 'agslib-3.0-2012-06-06.swc' in my libs folder.
0 Kudos
IvanBespalov
Frequent Contributor
answer to your question is here
ArcGIS API 3.0 (final) for Flex
... 
Requires Adobe Flex 4.6 SDK or higher, which in turn requires at least Flash Player 11.1. 
...


Post with link to download Adobe SDK 4.6
0 Kudos
KarolKarol
Emerging Contributor
Thank you very much. My mistake, I've missed that.
0 Kudos