POST
|
I am developing an ipad app using Flex (Adobe Air, Flash Builder). I understand that in objective-C, you can get the writable directory using NSDocumentDirectory, but how do you do the same in Flex?? In Flex, I use File.applicationStorageDirectory, and it works only when I run in the simulator. If I install the app on my ipad, it doesn't give any error, but I don't think it works. Please help!!
... View more
09-25-2012
02:27 PM
|
0
|
1
|
468
|
POST
|
Thank you for your reply. I found some help here: http://kirill-poletaev.blogspot.com/2011/07/xml-in-flex-part-5-using.html But thank you for your link. I will do more reading on that. 🙂
... View more
06-07-2012
08:47 PM
|
0
|
0
|
174
|
POST
|
Hello, Can you please help me populat a tree control from a local xml file? I have searched but unsuccessful. Thank you so much.
... View more
06-04-2012
09:09 PM
|
0
|
2
|
542
|
POST
|
Hello, Is there a way to read the extent from a map and set it (in lat/lon with projection?) For example: <esri:Map id="myMap" width="100%" height="100%" mapClick="mapClickHandler(event)" timeSlider="{myFirstTimeSlider}" openHandCursorVisible="false" wrapAround180="true"> <esri:Extent id="initExent" xmin="-10854962" ymin="4514317" xmax="-10779136" ymax="4572944"> <esri:SpatialReference wkid="102100"/> </esri:extent> <esri:ArcGISDynamicMapServiceLayer id="myDynamicService" fault="myDynamicService_faultHandler(event)" load="myTimeLayer_loadHandler(event)" loadError="myDynamicService_loadErrorHandler(event)"/> <esri:GraphicsLayer id="clickGraphicsLayer"/> </esri:Map> Here, instead of the below codes, that specifies the value for the extent (some number): <esri:Extent id="initExent" xmin="-10854962" ymin="4514317" xmax="-10779136" ymax="4572944"> <esri:SpatialReference wkid="102100"/> </esri:extent> Can I read from the map that I'm loading? Maybe like: myDynamicService.initialExtent.xmin, myDynamicService.initialExtent.xmax, etc...?? The extent for my map is set in lat/lon values, and so the projection also needs to be set. I don't know how to do this, because when I tried, at this time the values are 0. <esri:Extent id="initExent" xmin="{myDynamicService.initialExtent.xmin}" ymin="{myDynamicService.initialExtent.ymin}" xmax="{myDynamicService.initialExtent.xmax}" ymax="{myDynamicService.initialExtent.}"> <esri:SpatialReference wkid="{myDynamicService.spatialReference}"/> </esri:extent> Please help! thank you!!
... View more
04-22-2012
10:23 PM
|
0
|
2
|
512
|
POST
|
I just noticed something... I am very new with Flex so please don't be annoyed... I guess to use the IdentifyTask, I need the ArcGISTiledMapServiceLayer (IS THIS A CORRECT STATEMENT??). BUT I also need the Dynamic TOC and the Time slider (which needs both the tile and the dynamic services), so I also added a ArcGISDynamicMapServiceLayer on top of that. I think that is why it is doing like shown in the screen shot. The problem is not only that it doesn't look right, it also does not work correctly. Every time I try to click on the scrollbar (of the identify popup), it thinks I am clicking on a location of the map. I guess that is because I have another service on top of the Tile service. Any help, please??
... View more
04-12-2012
12:21 AM
|
0
|
0
|
150
|
POST
|
I'm using the Identify Task sample, but the pop up seem to be under my map layers?? How can I fix this? Please help. Thanks. Please see the screen shot. [ATTACH=CONFIG]13401[/ATTACH]
... View more
04-10-2012
02:40 PM
|
0
|
2
|
662
|
POST
|
I am so new, trying to learn the basics of flex!! I am not sure how the <fx:script> blocks work when there are more than one?! In my case, the script block within a control has no knowledge of the anything else outside of it!!! For example, the codes below... Please look toward the end at function "protected function pubMapThumb_clickHandler(event:MouseEvent):void". Within this function, I could not access anything "outside", like the "pubmapList" or any functions in the main <fx:script> block. Can someone explain that to me, and how would I achieve in doing that? (access "outside" controls). Thanks so much!!! [INDENT] <?xml version="1.0" encoding="utf-8"?> <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" width="1072" height="800" x="0" y="150" horizontalCenter="0" verticalCenter="0"> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <fx:Script> <![CDATA[ import mx.collections.*; [Bindable] public var imgArray:Array = new Array(); public function createDataProvider():ArrayList { //var imgArray:Array = new Array(); for(var i:int=0; i<9; i++) { imgArray = PathToMyImage(); } return new ArrayList(imgArray); } private function PathToMyImage():String { return "http://arcgisonline.com/sharing/content/items/0bb40265b64a4b29ac3bccb774413357/info/thumbnail/global_wetlands.jpg"; } ]]> </fx:Script> <mx:Text id="PubMapTitle" text="FEATURED MAPS" fontSize="36" y="45" horizontalCenter="0"/> <s:List id="pubmapList" dragEnabled="false" dropEnabled="false" dragMoveEnabled="false" dataProvider="{createDataProvider()}" y="110" horizontalCenter="0"> <s:layout> <s:TileLayout id="pubmapListTiles" verticalGap="10" horizontalGap="10" horizontalAlign="center" verticalAlign="middle" /> </s:layout> <s:itemRenderer> <fx:Component> <s:DataRenderer> <fx:Script> <![CDATA[ import flash.net.getClassByAlias; import mx.controls.Alert; import mx.core.UIComponent; public var uicomp:UIComponent; protected function image1_mouseOverHandler(event:MouseEvent):void { // TODO Auto-generated method stub //Alert.show("Map Info: " + "\n", "Map Details"); //rollOverTextArea.visible = true; //rollOverTextArea.text = "Map Info"; //rollOverTextArea.x = pubMapThumb.width.valueOf() + 10; pubMapThumb.toolTip = "Our Far South - Beyond Stewart Island (ArcGIS Viewer for Public)Live ArcGIS.com Map of the \"Our Far South\" Expedition to Antarctica"; } protected function image1_mouseOutHandler(event:MouseEvent):void { // TODO Auto-generated method stub //rollOverTextArea.visible = false; //rollOverTextArea.text = ""; } protected function pubMapThumb_clickHandler(event:MouseEvent):void { // TODO Auto-generated method stub //removeElement(uicomp); uicomp = new UIComponent(); addElement(uicomp); var mapmodule:MapModule = new MapModule(); mapmodule.setMapServer("http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer"); mapmodule.width = Capabilities.screenResolutionX; mapmodule.height = Capabilities.screenResolutionY * .80 - 160; uicomp.addChild(mapmodule); } ]]> </fx:Script> <s:BorderContainer includeInLayout="true" id="imgBorderContainer" borderWeight="3" borderStyle="solid"> <s:Image id="pubMapThumb" source="{data}" height="200" width="300" mouseOver="image1_mouseOverHandler(event)" mouseOut="image1_mouseOutHandler(event)" click="pubMapThumb_clickHandler(event)"/> </s:BorderContainer> </s:DataRenderer> </fx:Component> </s:itemRenderer> </s:List> </s:Group> [/INDENT]
... View more
02-28-2012
10:11 PM
|
0
|
6
|
888
|
POST
|
[ATTACH=CONFIG]12302[/ATTACH] Hi, I am new to Flex and was running some sample codes. I notice that when the identify window pops up, there is no way to close it?! There isn't any titlewindow that has an "x" to close. Please advise on how to do that. Thanks. The sample I am looking at is "IdentifySample" in the flex sample package.
... View more
02-28-2012
07:54 PM
|
0
|
1
|
449
|
POST
|
Hello, I am a total newbie. I downloaded the Flex Api along with the samples (arcgis_api_for_flex_2_5). I followed the instructions in the readme, but when running, I get a bunch of errors (one for each mxml). Adobe AIR application is missing the corresponding ArcGISWebMap-app.xml. ArcGISWebMap.mxml /FlexSample/src Unknown AIR application.xml Problem .... The same error for each mxml. There is only one xml in the project, in which was created when I create the project. The samples only provided mxml files. Please help. Thank you. ---- This is the instruction in the readme: ======================= ArcGIS API for Flex 2.5 build date 2011-11-30 ======================= This file contains the ArcGIS Flex API Library (the swc file), skins and sample code. =============== Getting Started =============== 1. In Adobe Flash Builder, create a new Flex project (File -> New -> Flex project). 2. Copy all the contents of the ArcGIS_Flex\samples\src folder to src folder of the Flex project created above. 3. In Adobe Flash Builder, add the API Library to the project through Project -> Properties -> Flex Build Path -> Library Path -> Add SWC (and locate the "agslib-2.5-2011-11-30.swc") 4. In Adobe Flash Builder, right-click on any of the sample mxml applications and click "Set as Default Application". 5. In Adobe Flash Builder, right-click on any of the sample mxml applications and click "Run Application".
... View more
02-07-2012
01:58 PM
|
0
|
2
|
664
|
POST
|
I am very new to this, so any clue would help. I need to display a map in a browser. I looked up and there is suggestion to convert the mxd to pmf. So my next question is how to embed the arcreader in the browser (so that the user does not need to install anything to view the map). I guess my ultimate goal is to do something like in the Arcgisonline gallery: http://arcgisonline.com/home/gallery.html I think this is the direction that I should go?? I appreciate any suggestions. Thank you! 🙂
... View more
01-03-2012
10:45 PM
|
0
|
1
|
2496
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|