POST
|
Hello, I am attempting to mirror the look of an AttributeTable component I used in a non-viewer Flex API application. See the screenshot below for the look I am trying to mirror on the left, with current application on the right. [ATTACH=CONFIG]26863[/ATTACH] I have done most of my modifications so far using CSS and the AttributeTableSkin, however I cannot locate where to make change to the padding or whatever is causing the space between the edge of the bottom panel/application and the actual DataGrid. In addition, one other visual element I cannot locate to make change to is the cornerRadius that exists around the entire bottom panel/container. It is most noticeable on top next to the yellow line for collapsing the panel. Does anyone have an idea where these modifications can be made? Thanks, David
... View more
08-21-2013
11:09 AM
|
0
|
4
|
1011
|
POST
|
Robert, I have been requested to change the color of the search prompt that automatically displays in the Geocoder. Would this be done in the skin as well? Looking through the code I have located <s:RichEditableText id="textDisplay" and the <s:Label id="promptDisplay" and followed them through the actionscript code. I don't see anywhere in the mxml or AS where the color is set. Is this possible to change? I was able to successfully change the prompt text that is displayed in the Header Controller widget in the xml file and the background was changed to white. However, the text is gray and now hard to read. Thanks, David
... View more
08-20-2013
07:37 AM
|
0
|
0
|
1047
|
POST
|
Robert, My mistake. I have that downloaded, also. I have located the "bgfill" SolidColor tag within the GeocoderSkin.mxml. It is default set to white, but my application is still showing up blue like the style set in the config file. I am referencing the skin-class in the default.css file as esri|Geocoder
{
skin-class: ClassReference("com.esri.viewer.skins.MyGeocoderSkin");
} Is this not where I should be referencing the skin? Or is this not the correct part of the skin to make the background of the geocoder white? <s:Rect id="background"
left="1" right="1" top="1" bottom="1">
<s:fill>
<s:SolidColor id="bgFill" color="0xFFFFFF"/>
</s:fill>
</s:Rect>
... View more
08-15-2013
10:45 AM
|
0
|
0
|
1047
|
POST
|
Hi Robert, Thanks for your reply. I am having trouble locating the GeocoderSkin.mxml. I am running Flex 3.3 and looking in the Skins package. I found https://developers.arcgis.com/en/flex/api-reference/ in the API reference stating it was implemented in 3.2--but where? Thanks! David PS This is what I see exactly in the package explorer: [ATTACH=CONFIG]26709[/ATTACH]
... View more
08-14-2013
11:43 AM
|
0
|
0
|
1047
|
POST
|
Hello, I am trying to match the design of an application I created using the Flex API, not the Viewer. I have attached an image with each application side by side, with the one I am trying to mirror on the left. Specifically, the changes I still need to make are: In the header controller: --How to change the color of the background of the geocoder only, not the entire header --How to change the "Enter address..." text in the geocoder In the attribute table: --How to make the background color white and the text black (more basic looking) [ATTACH=CONFIG]26705[/ATTACH] I am pretty sure I can figure out how to make these changes--I just need some direction on where to look! Thanks in advance for your help! David
... View more
08-14-2013
09:31 AM
|
0
|
8
|
1512
|
POST
|
Instead of using height use size: <widgetcontainer paneltype="bottom" initialstate="open" size="250"> This works without the need to change the source code. Regards Anthony Hi Anthony, I just wanted to comment since there was no confirmation by checkmark that your response was also correct. I was looking to change the size of my attribute table and stumbled upon this thread--it seems to me your way is the easiest solution. I was able to change the size of my attribute table panel by using the "size" property instead of "height". Thanks again! David
... View more
07-29-2013
12:28 PM
|
0
|
0
|
591
|
POST
|
Thank you both. Definitely not worth messing around with the code for me this time--I will likely try combining them into one graphic--which I had already considered. I think that is probably the easiest solution, but the static image widget is a great idea, too! David
... View more
07-24-2013
12:36 PM
|
0
|
0
|
268
|
POST
|
Hi all, I was wondering if it's possible to have more than one image/logo to be included in the header controller. In my experience, the application only recognizes the first logo tag in the main config file and ignores the other one. Is there any way to include more than one? I am hoping for a horizontal layout, such that a second image is laid to the right of the first one. Thanks, David
... View more
07-24-2013
12:16 PM
|
0
|
3
|
660
|
POST
|
Hello, I have a seemingly difficult request to tweak something minor, but perhaps someone will have an idea if this is possible. I have a function exportToExcel() that takes myFeatureLayer.graphicProvider and saves it as an Array Collection so that it can be exported to Excel as a .xls (not csv!) The featureLayer has 9 outFields set, and they show up in the Attribute Table, with the alias names as defined in my feature service, in the order as set in the outFields property. Now, when the Array Collection is populated by clicking the a button to trigger the exportToExcel() function, the export runs but the issue is my boss wants it to match how the Attribute Table looks exactly. This means, I need to figure out how to make the headers as the alias and the order of the columns needs to match. For some reason, when the Array Collection is created, the fields are arranged in alphabetical order, instead of by fields order. Is there a way to list of the column titles in order by fields? How about a way to exlude a field? (For example, the ObjectID field which does not show up in the Attribute Table, but does show up from the graphicProvider) I am thinking I will need to write some loop or conditional to grab the column title and skip over it when exporting, I'm just not sure if this is possible. Any help as always is appreciated! Thanks. David For reference, here is my exportToExcel() function: private function exportToExcel():void { var featureCollection:ArrayCollection = myFeatureLayer.graphicProvider as ArrayCollection; var exportSet:Array = []; for each (var graphic:Graphic in featureCollection){ if (myMap.extent.intersects(graphic.geometry)) { exportSet.push(graphic.attributes); } } exportData = new ArrayCollection(exportSet); sheet = new Sheet(); var dataProviderCollection:ArrayCollection = ssoDataGrid.dataProvider as ArrayCollection; var rowCount:int = dataProviderCollection.length; sheet.resize(rowCount + 1,ssoDataGrid.columnCount); var columns:Array = ssoDataGrid.columns; var i:int = 0; for each (var field:DataGridColumn in columns){ fields.push(field.dataField.toString()); sheet.setCell(0,i,field.dataField.toString()); i++; } for(var r:int=0; r < rowCount; r++) { var record:Object = dataProviderCollection.getItemAt(r); /*insert record starting from row 2 else headers will be overwritten*/ insertRecordInSheet(r+1,sheet,record); } var xls:ExcelFile = new ExcelFile(); xls.sheets.addItem(sheet); var bytes: ByteArray = xls.saveToByteArray(); var fr:FileReference = new FileReference(); fr.save(bytes,"SSO_Table_Export.xls"); } private function insertRecordInSheet(row:int,sheet:Sheet,record:Object):void { var colCount:int = ssoDataGrid.columnCount; for(var c:int; c < colCount; c++) { var i:int = 0; for each(var field:String in fields){ for each (var value:String in record){ if (record[field].toString() == value) sheet.setCell(row,i,value); } i++; } } } And how myFeatureLayer is defined: <esri:FeatureLayer id="myFeatureLayer" mode="snapshot" outFields="[ADDRESS,NEIGHBORHOOD,EST_SPILL_START_DATE,EST_SPILL_END_DATE,EST_SPILL_START_TIME,EST_SPILL_END_TIME,SPILL_VOLUME_GAL,CAUSE,CORRECTIVE_ACTION]" definitionExpression="{updateDefExp}" selectionColor="cyan" url="http://ntts10/ArcGIS/rest/services/Maps/sso_spill_type/MapServer/0"/> This is a screenshot of the attribute table and how it needs to look in Excel: [ATTACH=CONFIG]25837[/ATTACH] This is a screenshot of how it looks when exported into Excel: [ATTACH=CONFIG]25838[/ATTACH]
... View more
07-10-2013
07:12 AM
|
0
|
6
|
3822
|
POST
|
Thank you for your responses. I was able to easily add the appropriate code the MapManager.mxml configMapAtrributes() function and it works correctly. I will look into this widget, too, because it sounds very convenient. Thanks again! David
... View more
07-09-2013
05:43 AM
|
0
|
0
|
352
|
POST
|
Hi all, I am trying to disable scroll wheel zooming in a map using the Viewer. In other straight API applications I was able to accomplish this by using the scrollWheelZoomEnabled="false" property on the map. Is there a Viewer equivalent to this? Thank you! David
... View more
07-08-2013
12:08 PM
|
0
|
3
|
498
|
POST
|
Hi all, I am trying to recreate an application that I currently have working in the Flex Viewer. It uses a single line geocode service that is hosted on ArcGIS Server 10.0. In the Viewer I am using the header control widget to configure my geocode service with the following tags: <geocoder> <url>http://ntts10/ArcGIS/rest/services/Locators/BWSC_FULLNEIGHBORHOOD/GeocodeServer</url> <zoomscale>1000</zoomscale> <autocomplete>true</autocomplete> <maxlocations>8</maxlocations> </geocoder> Now, when I try to insert a geocoder into a Border Container on a straight Flex API application, using the same properties, I can't get it to work. The search box appears, but when I type an address into it, it neither shows autocomplete results nor does it seem to find any results at all. Here is my code where I instered it in my mxml application: <esri:Geocoder autoComplete="true" maxLocations="8" url="http://ntts10/ArcGIS/rest/services/Locators/BWSC_FULLNEIGHBORHOOD/GeocodeServer"/> Lastly, when trying to mirror the properties I had set on the geocoder in the Viewer, I did not find a property to set <zoomscale> to 1000 like I had set in the HeaderController xml file. Is there a way to configure this outside the viewer? Thanks! David
... View more
07-02-2013
09:31 AM
|
0
|
1
|
572
|
POST
|
Sarthak, THANK YOU! That works exactly as I needed it to. All I had to do was add exportSet.push(graphic.attributes); and the array was populated with everything correctly. Thanks again very much! David
... View more
06-28-2013
09:27 AM
|
0
|
0
|
243
|
POST
|
Can anyone please help explain to me how to use extent.intersects correctly? I understand the input parameter needs to be a geometry type and it will return a boolean value. I am ultimately trying to check if each individual feature in my featureLayer exists in the current extent (kind of like the Attribute Table) and if the feature exists, I then would like to export/copy that feature to another array to populate a data grid. One of my many attempts is: //Code for Data Download button public function dataDownload():void { var featureSet:FeatureSet = new FeatureSet(ArrayCollection(myFeatureLayer.graphicProvider).toArray()); var records:Array = featureSet.attributes; var exportSet:Array = new Array(); for (var i:int=0; i<records.length; i++){ if (myMap.extent.intersects(records.geometry)) { exportSet.push(records); } } ssoDataGrid.dataProvider = new ArrayList(exportSet); } I have checked the records array and it is being correctly populated by my feature layer. I am struggling with writing the correct loop to loop through the features, but more importantly I don't think my "if statement" has ever returned "True" because the exportSet array is always empty. I think I am messing up by not looping through the graphicProvider to access the geometry, but I don't know how to loop through that unless it's an array... I am still fairly new to flex and OO programming, so any suggestions or reference would be greatly appreciated! Thank you very much. David
... View more
06-28-2013
07:35 AM
|
0
|
2
|
586
|
Title | Kudos | Posted |
---|---|---|
1 | 04-02-2015 12:53 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|