POST
|
Hey Jason, I noticed that this is an issue with the Edit Widget where the <formfieldsorder> is not being honored. Having looked at it in more detail and to be consistent with other widgets, i think it would make sense that if the fields are being specified explicitly in a certain order in the config, then there is no need to specify <formfieldsorder> as it would be redundant. Here's the fix (if you are using the uncompiled version) for the EditWidget.mxml, replace the attributeInspector_showFeatureHandler() method with:
private function attributeInspector_showFeatureHandler(event:AttributeInspectorEvent):void
{
attachmentInspector.addEnabled = editor.attributeInspector.updateEnabled;
attachmentInspector.deleteEnabled = editor.attributeInspector.deleteButtonVisible;
const featureLayer:FeatureLayer = event.featureLayer;
var settingsKey:String = featureLayer.name;
if (featureLayer.name.indexOf("hiddenLayer_") != -1)
{
settingsKey = hiddenFeatureLayerToSettingsName[featureLayer];
if (!settingsKey)
{
settingsKey = featureLayerToDynamicMapService[featureLayer].name +
"/" + featureLayer.url.substring(featureLayer.url.lastIndexOf("/") + 1, featureLayer.url.length);
hiddenFeatureLayerToSettingsName[featureLayer] = settingsKey;
}
}
var settingsObject:Object = layerToSettings[settingsKey];
if (settingsObject)
{
var outFields:Array = settingsObject.outFields as Array;
if (outFields && outFields.length)
{
var attributeInspectorFieldInspectors:Array = [];
var fieldInspector:FieldInspector;
for each (var fieldObject:Object in outFields)
{
fieldInspector = new FieldInspector;
fieldInspector.featureLayer = featureLayer;
fieldInspector.visible = true;
fieldInspector.fieldName = fieldObject.name;
fieldInspector.label = fieldObject.alias;
fieldInspector.toolTip = fieldObject.tooltip;
attributeInspectorFieldInspectors.push(fieldInspector);
}
for each (var field:Field in featureLayer.layerDetails.fields)
{
if (outFields.indexOf(field.name) == -1)
{
fieldInspector = new FieldInspector;
fieldInspector.featureLayer = featureLayer;
fieldInspector.visible = false;
fieldInspector.fieldName = field.name;
attributeInspectorFieldInspectors.push(fieldInspector);
}
}
editor.attributeInspector.fieldInspectors = attributeInspectorFieldInspectors;
editor.attributeInspector.formFieldsOrder = AttributeInspector.FIELD_INSPECTOR_ORDER;
}
else
{
var formFieldsOrder:String = settingsObject.formFieldsOrder;
if (formFieldsOrder)
{
editor.attributeInspector.formFieldsOrder = formFieldsOrder;
}
}
var singleToMultilineThreshold:Number = settingsObject.singleToMultilineThreshold;
if (singleToMultilineThreshold && !isNaN(singleToMultilineThreshold))
{
editor.attributeInspector.singleToMultilineThreshold = singleToMultilineThreshold;
}
var showObjectID:String = settingsObject.showObjectID;
if (showObjectID)
{
editor.attributeInspector.showObjectID = showObjectID == "true";
}
var showGlobalID:String = settingsObject.showGlobalID;
if (showGlobalID)
{
editor.attributeInspector.showGlobalID = showGlobalID == "true";
}
}
}
You would not have to set the <formfieldsorder> anymore with this update. Thank you very much for letting me know about this. It took care of my issues and i can move on to something else now.
... View more
01-09-2013
06:02 AM
|
0
|
0
|
726
|
POST
|
Ok i've been working on this for awhile and can never seem to get the edit widget to do what i would like it to. In the tag reference it talks about using the <formfieldsorder> you can pick from "fields, alphabetical, fieldinspector". I have a specific order i'm trying to get and i cant seem to get it to do it. for example i have 5 attributes and i want them in the order of: TYPE, DESCRIPTION, STATUS, START_DATE, END_DATE. The following is a copy from my EditWidget.xml. <?xml version="1.0" ?> <!-- If compiling this widget, make sure to add -keep-all-type-selectors=true to your compiler arguments in the FB project properties. --> <configuration> <createoptions> <polygondrawtools>polygon,freehandpolygon,extent,autocomplete </polygondrawtools> <polylinedrawtools>polyline,freehandpolyline,line</polylinedrawtools> </createoptions> <addfeatures>true</addfeatures> <deletefeatures>true</deletefeatures> <toolbarvisible>true</toolbarvisible> <toolbarcutvisible>true</toolbarcutvisible> <toolbarmergevisible>true</toolbarmergevisible> <toolbarreshapevisible>true</toolbarreshapevisible> <updategeometry>true</updategeometry> <updateattributes>true</updateattributes> <layersettings> <layer name="Active Incident Areas"> <fields> <field name="TYPE" alias="Type" /> <field name="DESCRIPTION" alias="Description" /> <field name="STATUS" alias="Status" /> <field name="START_DATE" alias="Start" /> <field name="END_DATE" alias="End" /> </fields> <showobjectid>false</showobjectid> <showglobalid>false</showglobalid> <singletomultilinethreshold>60</singletomultilinethreshold> <formfieldsorder>fields</formfieldsorder> </layer> </layersettings> </configuration> I've made sure that the name of the Layer is the name of the layer in the main config xml file. Also the service is a type of feature. attached is what is returned. [ATTACH=CONFIG]20549[/ATTACH] Which is the order they show up in the MXD i have. I've tried moving them around in the mxd and republish the service but they remain in the same order on the website. I've tried clear all cache and temporary files to see if that was the issue but still no luck. Anybody have any othre sugguestions i could try? thanks.
... View more
01-08-2013
11:41 AM
|
0
|
10
|
2886
|
POST
|
Hi Jason - Have you ever seen this issue before? I tried your suggestion and it doesn't seem to be working for my printer set up. My 11x17 Landscape map prints the symbology fine, but my 11x17 Portrait maps run into the same problem you experienced before. I just running 10.1 service pack 1. Any other suggestions? Thanks, m Here is a link somebody posted earlier to me and it seemed to fix my issues. http://support.esri.com/en/knowledgebase/techarticles/detail/40538 I set my default on the server to our plotter and created a giant size custom size of 44x60. I have 24x36 layouts setup and wanted to make sure i dont have to deal with this issue later on so that why i went with that size. In the link above make sure to follow all of the steps carefully. And make sure you know which account the ArcGIS Server Service is running as in Services. Another thing to try is changing the DPI which i grabbed the code from this thread which helped on getting a better quality in the map. A big thanks to rhett for this bit of code. http://forums.arcgis.com/threads/71331-FV-3-advanced-print-widget-output-quality?highlight=dpi+setting Hopefully that will take care of your issues.
... View more
01-02-2013
01:19 PM
|
1
|
0
|
574
|
POST
|
Jason, I have done volumes of testing with printing landscape and it works great. But the setting of landscape is not done in the code it is handled by the print engine. All you have to do is when the print dialog appears go into the preferences for the chosen print and choose landscape. Well that sounds like a easy fix. Thank you for your input on my question.
... View more
12-26-2012
08:34 AM
|
0
|
0
|
249
|
POST
|
Jason: Are you printing the datagrid by itself? Or are you able to print the datagrid along with the map? I am just printing the datagrid itself. The esearch widget you can set it up to print your search results and you can also setup the relates so you can print the related attributes as well. I would like to get both, search results datagrid and the related datagrid to both be landscaped by default. You could probably reference the MAP_ONLY in the print widget and maybe append or merge that to the search widgets printing of the datagrid or vice versa. but they would be on separate pages. Never attempted that yet.
... View more
12-26-2012
07:26 AM
|
0
|
0
|
249
|
POST
|
Thank you Robert for giving up the ability to print the datagrids, it is a fantastic feature to have in the esearch. I was wondering if anybody has attempted to switch the printing of the datagrids to landscape instead of portrait? i have a few fields (about 10 attributes) returning and i would like to get them all on one line on the same page. If i switch it to landscape that would fix my issue. I've tried shrinking the text but it doesnt quite fit still. I know it has to be in the PrintUtil.as file just wanted some pointers if anybody had tried it yet. I'm using esearch widget version # 3.1.1. thanks.
... View more
12-26-2012
07:07 AM
|
0
|
4
|
712
|
POST
|
At 3.1, it is NOT possible to exclude a layer within a map service, if specified the whole map service would be excluded Okay that is good to know. Are there any plans to add this to a future release? Sounds like i'll have to reorganize some map services on my end then. Also any idea on why i get lines thru my legend features?
... View more
12-18-2012
12:25 PM
|
0
|
0
|
549
|
POST
|
I'm trying to exclude some layers from my print layouts in Flex viewer 3.1. I see that in the new documentation you can use the: <excludelayerfromlegend>thelayername</excludelayerfromlegend> to remove the entire map service. My question is how to only eliminate 1 or 2 layers in a mapservice from the legend? I'm using ArcGIS 10.1 Here are some examples of things i have tried but nothing seems to work. Perhaps somebody has tried to do this already and can explain to me what i'm doing wrong. <excludelayerfromlegend>CityAnnexations</excludelayerfromlegend> --> this will remove all of this mapservice from the legend. But NOT all of the time. Sometimes it will randomly show up on the layout. After cleaning my temp files and even restarting my pc. I've tried the following with no luck to exclude only certains layers in a map service. Can somebody from the ESRI team give me a correct example on how to specifically exclude a layer from a map service with the print widget, or if it is possible to do in 3.1. <excludelayerfromlegend>CityAnnexations</excludelayerfromlegend> <excludelayerfromlegend>PLSS Boundaries "1,3,4,5,6,7,8,9,10,11"</excludelayerfromlegend> Also my images in the legend come out all weird with lines thru them and they should just be outlines with no fill for symbology. the support team tried to assist me in this a few months back by changing the default printer on the server to have a paper size greater than anything you would print but that workaround does not work now and it is very frustrating. Thanks, Jason
... View more
12-18-2012
11:51 AM
|
1
|
13
|
3260
|
POST
|
Not the best approach maybe, but you could try this. I don't use the application builder but once you have the majority of the xml created with the builder you can go to that file on your computer or network and add in the formatting of the fields in to the xml with notepad or some other program. Save your changes, and then just right click and make the file read only and that should stop Application builder from modifying or deleting your information. Of course you can't modify the file in application builder or notepad till you right click and uncheck the read only. But it should allow you to get it done and move on to other things.
... View more
11-28-2012
09:25 AM
|
0
|
0
|
220
|
POST
|
Re: configuring pop-ups in 3.0: I'm under the impression that it's best to choose to configure the pop-up using either: 1) the Application Builder via the <description> tag -- I like this option because I can format my text using the HTML tags, OR 2) the XML <configuration> -- I like this option because I can use numeric and date formatting tags on FIELD values. I cannot see examples of how to either: 1) format date or number FIELDS within the <description> tag, OR 2) format non-field text without the <description> tag Following an example here, I can create the pop-up via the XML file, using <description> and <field> tags, like this: <configuration>
<title>Prioritized Tracts</title>
<description><![CDATA[
<br><i><b>Name:</b></i> {TRACTNAME}
<br><i><b>GIS Acres:</b></i> {GIS_ACRES}
<br><i><b>Salesforce:</b></i> <a href="{SALESFORCE_URL}"> (Link) </a><br>]]></description>
<fields>
<field name = "GIS_ACRES">
<format usethousandsseparator="true"/>
<format precision="0"/>
</field>
</fields>
</configuration> BUT, if I then view the code inside the Application Builder, all my field formatting gets deleted from the XML (everything below </description>)... this seems risky since I move between App Builder and configuration files. It seems safer to choose either <description> or <configuration>, rather than mixing the two, but I don't know how to do all the formatting I need using either option. Any advice is welcome. Oh, and my pop-up doesn't seem complicated, I need to be able to do these things: Name: Green Acres (bold/italics formatting on the left-hand column names) Acres: 2,550 (bold/italics formatting, and the FIELD needs precision and thousandsseparator formatting on its value) Date Protected: 2/3/2010 (bold/italics formatting, and the FIELD needs date formatting on its value) Under your fields tag add the following and change it to your data. Make sure to keep it false for visible and pick your dateformat you want but i think you are looking for shortDate. If you have that field for example INSTALLDATE in your description tag it will format the date using whatever you specified, for example shortDate.
<field name="INSTALLDATE" alias="Install Date" visible="false">
<format dateformat="shortDate"/>
</field> It has worked for me and should work for you as well.
... View more
11-27-2012
01:58 PM
|
0
|
0
|
220
|
POST
|
I have this problem as well. So I have a feature class that had a date field in it. When this date field got populated it shows them like this, "11/13/12 11:23:57". I am now creating a web map using the ArcGIS Viewer for Flex, when I go into the configuration of the pop-up window I have the simple script of "<b>Date Collected: </b>{DateCollected}" along with listing a bunch of other fields. DateCollected is the field name. Then when I go to view this in the map is lists the "Date Collected: 1332340861000" I understand that I need to tell it to put that field in a particular format, I would like ShortDateShortTime. I just don't understand how to accomplish that. I have no html language/code experience and am learning as i go. The whole number is displays doesn't even look close to the date and time numbers. How do I get my date field to display correctly? If you are trying to format the date in the Description tag try this to get the short date. <description><![CDATA[<b>Date Collected: </b>{DateCollected}]]></description>
<fields>
<field name="DateCollected" alias="Date Collected" visible="false">
<format dateformat="shortDateShortTime"/>
</field>
</fields> I believe that is how i resolved the date in the popup.
... View more
11-13-2012
06:59 AM
|
0
|
0
|
868
|
POST
|
I am having the same problem with my Legend displaying incorrectly with simple symbols when I export to PDF, but the other image formats are fine. Is there a solution to this issue? My way to fix this was ESRI told me to change the DEFAULT printer on the server. Make the default paper size larger than any map layouts you have. So if you biggest map layout is 11x17 change the default paper size on your default printer to 24x36 or something like that. Also, i made the quality of the print be the highest of quality (600 dpi) instead of fast print or draft if your printer has such an option. After i did this, my PDF come out fine. Not sure why exactly that is the workaround but it did fix my strange lines in my legend. This will correct your PDF problem and all of the other formats will work as well. Hope that helps 🙂 jason
... View more
11-09-2012
10:01 AM
|
0
|
0
|
574
|
POST
|
Hi, Check function getLegendOptions() in ExportWebMapForm.mxml, it excluded BaseMapLayer by default. You can customize this function to exlcude other layers. Hope this helps. Rose Could you show a bit on how you excluded a layer out of an operational service? Maybe if i can see how to exclude one layer i can figure out the rest of it out. thanks
... View more
11-05-2012
10:35 AM
|
0
|
0
|
216
|
POST
|
Would you mind sharing where you changed the code at to accomplish this? I thought i had to do this thru the JSON for the print service but if you can only change it in the .MXML that would be a lot easier. Thank you.
... View more
11-05-2012
06:36 AM
|
0
|
0
|
216
|
POST
|
I have a few questions and I hope somebody at ESRI or the forums can answer is this. #1. When i created my custom layouts everything is working fine except for the legend portion. My first issue is that the symbols look terrible and have weird lines going through them. Attached is an image showing the print Widget symbology next to what the symbols should look like. [ATTACH=CONFIG]17726[/ATTACH] How can i get this corrected? Most of the symbols are not that complicated. Either solid filled, or outlines. #2. How can you control what is added to the legend? I've tried the default legend widget that comes with the viewer and i've tried the Dynamic Legend widget that robert created and it does remove the items from the dynamic legend by using the exclude Layer and the Id of the layer to remove, but it will still shows up on the PDF in the print widget. Does it pull the legends from each MXD? If so, if i create a legend for each basemap or operational layer will it honor what is to show in the legend for the website. I've attempted to remove items from the MXDs so they would not show on the PDF but it appears to have no effect on what shows on the legend. #3. Can you set the Legend to only show what is displayed on the screen? I know this works on Arcmap 10.1 for a standard map but i don't see this working for an flex application. Is this possible or any workaround people know of? If anybody else has suggestions i welcome them. Thanks, Jason
... View more
09-17-2012
07:27 AM
|
0
|
6
|
2948
|
Title | Kudos | Posted |
---|---|---|
1 | 01-02-2013 01:19 PM | |
1 | 12-18-2012 11:51 AM |
Online Status |
Offline
|
Date Last Visited |
03-22-2023
07:36 PM
|