Quantcast
Channel: Forums - ArcGIS Viewer for Flex
Viewing all 2097 articles
Browse latest View live

Event dispatching in widget.

$
0
0
I wish to dispatch an customized event in my widget. what i have done in my widget is this:
step 1: i created an event type:
<fx:Metadata>
[Event(name="mywidgetevent", type="flash.events.Event")]
</fx:Metadata>

then in step 2: i have invoked this event using

var eventObject:Event=new Event("mywidgetevent");
dispatchEvent(eventObject);

Now I wish to use this event handler. can i use this widget in my application using <components tag> becaz than i can catch the event and write eventhandler for this. If not what is other way of doing this.
regards
nadeem

eSearch problem (older version)

$
0
0
Hi guys,

I'm using an older version of eSearch (2.x) in an important custom mapping app and I'm working with Flash Builder/Flex 4.6 to get ready for the move to 3.0 Viewer (after the Holidays). However, it'd be nice to resolve this problem (in the interim for the client): After obtaining search results into a datagrid (fixed), the datagrid appears too large for its window (for lack of a better term) and overlaps the boundaries of the window when many columns are returned. How can I set the datagrid's width to not exceed its window?

I am wondering if the solution lies in using a Spark datagrid? It's probably a quick fix but I'm not good with Spark yet... Any help would be appreciated.

Here are the uncompiled files in my eSearch widget, and I can post the code if needed:

assets.images
alphaSliderSkin.mxml
ArrayCollectionExtended.as
CollapsiblePanel.as
ExportButtonSkin.mxml
HyperlinkColumn.mxml
joinDataGridColumn.as
ResizeTitleWindow.as
ResizeTitleWindowSkin.mxml
SearchResult.as
SearchResultDataGroup.as
SearchResultItemRenderer.mxml
SearchWidget.mxml
SearchWidget.xml
SearchWidgetFloatDG.mxml
SearchWidgetFloatDGSkin.mxml
TextEnteredEvent.as
TextHeaderRenderer.as
WidgetCloseButtonSkin.mxml

DIFFERENCE BETWEEN WIDGET AND MODULE

$
0
0
WHAT IS THE MAIN DIFFERENCE BETWEEN A WIDGET AND FLEX MODULE. IF WIDGET IS A MODULE THAN CAN WE USE IT USING <S:MODULE> TAG IN APPLICATION TO LOAD A WIDGET.

Populate Attributes From Second Feature Class

$
0
0
I am using the Editor widget to allow users to add points to a SDE feature class. I would like to populate several of the attributes automatically from a second feature class (poly) where they already exist. Any good ideas or great code?

Configuring pop-ups in ArcGIS Viewer for Flex 3.0

$
0
0
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:
Code:

<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)

Adding new features with EDIT WIDGET

$
0
0
I am trying to configure a feature service to be an editable layer in my FLEX application. I have added a new feature class to my database and published the MXD as a feature service. I can configure the edit widget in the FLEX viewer and everything seems fine.

When I go the the URL of my application and try to add points using the EDIT WIDGET, it allows me to place a point and enter values for all of the attributes. The problem occurs when I click "OK" to save the point(s). As soon as I click "OK", the point disappears.

I go back to the MXD to see if they are actually saving in the feature class, but I'm not having any luck. What could be the problem?

widget communication :Queryfromurl

$
0
0
is there any function name QueryFromURL in flex api. I have seen this in one of the code but m not clear about this function. the code i have found is :
var id:Number = ViewerContainer.getInstance().widgetManager.getWidgetId("mywidgett");
var bWidget:IBaseWidget = ViewerContainer.getInstance().widgetManager.getWidget(id, true) as IBaseWidget;
if (bWidget){
var vSW:* = bWidget;
vSW.queryFromURL("aaa",2,0);


I want to know what is purpose of queryFromURL and is it function of widget itself
regards
nqazi.

REST service Has No Arrow In Legend Widget

$
0
0
Hello,

In the flex viewer, I have added dynamic layer urls to connect to an arcserver rest service. This rest service is published via the internet (someone else's server). The flex viewer app opens fine with no errors. However, In the legend widget, the layers do not have the arrow next to them, and do not draw (appear to be connected). I can see the rest endpoint and the layers underneath it just fine (from the same server where the viewer app is published).

Anybody know how I can determine problem? Is it network related? How to isolate the performance through the viewer application, when the rest service url works fine?

Thanks,
Jodi

how-to? - editable layer, publicly viewable but edited only with org account . . .

$
0
0
perhaps someone can point me in the right direction, or provide more info.

I'm making a flex application with an editable feature service . . . which is why I'm in this forum, though I'm not sure if this is entirely a flex 'thing'

I'd like for this application to be publicly available to browse, but also within the application I'd like to have my feature service only editable by select users in my arcgis online organizational account.

How can this be achieved?

Thanks.

set ArcGISDynamicMapServiceLayer properties

$
0
0
I am utilizing the following code from the MapServicesWidget:


Code:

                                                case "dynamic":
                                                {
                                                        var dynLayer:ArcGISDynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer(url);
                                                        dynLayer.alpha = alpha;
                                                        dynLayer.id = label;
                                                        dynLayer.name = label;
                                                        dynLayer.token = token;
                                                        dynLayer.visible = visible;
                                                        dynLayer.useMapTime = useMapTime;
                                                        dynLayer.sublayerid = sublayerid ;
                                                        dynLayer.popupconfig= popupconfig;

                                         
                                                        if (autoRefresh > 0)
                                                        {
                                                                setInterval(dynLayer.refresh, autoRefresh * 1000);
                                                        }
                                                        if (imageFormat)
                                                        {
                                                                dynLayer.imageFormat = imageFormat;
                                                        }
                                                        if (visibleLayers)
                                                        {
                                                                var vizLayers:Array = visibleLayers.split(",");
                                                                for (i = 0; i < vizLayers.length; i++)
                                                                {
                                                                        vizLayers[i] = Number(vizLayers[i]); // convert to Numbers
                                                                }
                                                                dynLayer.visibleLayers = new ArrayCollection(vizLayers);
                                                        }
                                                        if (proxyUrl && useProxy)
                                                        {
                                                                dynLayer.proxyURL = proxyUrl;
                                                        }
                                                       
                                                        map.addLayer(dynLayer);
                                                        break;
                                                }

This allows me to pick from a list, and load the service into the current map.
Was wondering if there is a way to set the popupconfig file to use for each sublayer (similar to the config.xml file) so that when i load the service with the widget (something like in red above), it will recongnize the appropriate popupconfig.xml file?

Thanks for any suggestions,

R_

Group layers in Flex viewer

$
0
0
Hi,
we are three students who have to do some wprk in ArcGIS viewer for flex. We have some layers in ArcGIS Online added to viewer for flex and need to create "group layers" in Layer list. For example,,, we have railway layer, highway layer and road layer... we need to make group of these layers named "comunications". We don't have Arcgis server, so we dont know how to do it and the term of submission is on Saturday night. Please help us, we are helpless.

connect flex viewer to GDB oracle

$
0
0
hello everybody
i have a spatial gdb created with oracle_sde
i want to know how can i connect directly to oracle database from flexviewer.
i mean, i want to access the attribute information to do analisys and display them.
thx

Parcel ID Mask

$
0
0
I have had complaints from users that it is too hard too insert the dashes and points in a parcel number. I am using the Enhanced Search Widget. Is there a way to set up a Mask or something that automatically inserts the dashes and points? Thanks for the time!

Need help on customizing edit widget/attribute inspector

$
0
0
I want to add a button to a customized version of EditWidgetAttributeInspectorSkin.mxml to be used with the edit widget when a specific config.xml is being used to allow the update of a specific attribute on a road feature layer. I have the standard edit widget working and the only editable attribute appears and can be updated. The problem is if you select multiple roads and want to change the attribute on all of them to the same value, you have to do it one at a time. I want to have a button on the skin that you can click to set the attribute to the selected value on all of the selected features.

I've looked at the mxml source to the editwidget and the editwidgetattributeinspectorskin and I don't know how to proceed. I can add a button to the skin, but not sure what to do to enable it and make use of it. When it's clicked, I want it to loop through all selected features and change the attribute from its present value to the one selected in the EditWidgetAttributeInspectorSkin by the user. Sounds simple :^)

I'm hoping one of you with more programming experience can help increase my knowledge through this.

Thanks

Displaying multiple features in popup windows

$
0
0
Hi,
does anyone know how to hook into the popup window functionality that's built into the Flex 3.0 API?

The online documentation on popup configuration files (http://resources.arcgis.com/en/help/...000002q000000/) states, "This pop-up functionality is built in to the API and is not a separate widget."

Additionally, the "What's New" (http://resources.arcgis.com/en/help/...0000011000000/) section states as one of the enhancements for the 3.0 pre-release, "Pop-up windows contain multiple features".

Given that a lot of effort has gone into providing this functionality and a lot of effort can also be expended on setup of the popup config XML files, it would be great to be able to make use of this throughout the Flex Viewer application.

I understand that setting the value of map.infoWindowRenderersEnabled true/false effectively turns on/off this functionality for when a user clicks on the map.

Is there any way to programatically access this functionality???

For example, I would like to be able to show a popup for all features found at the location of a graphic centerpoint when the user hovers the mouse over that graphic. I know I could configure my own infoWindowRenderers but this seems highly redundant if I've already defined the popup config for every layer in my map in the main configuration file and I would also have to find a way to implement the "multiple features in a popup" functionality myself.

thanks,
Nic

Draw and Measure Widget

$
0
0
For instance I'm measuring with the polygon tool, the widget tells me the area and perimeter. Is there something I can do in the code that will display the lengths of each side of the polygon? Thanks

print widget implementation

$
0
0
Hi
I am working on an application (already created and implemented by some one else) which generates mail labels on the based of address search. I want to implement print widget in that using Export Web Map service.
But print functionality has already been implemented in that app using FlexPrintJob and FlexPrintJobScaleType.
I don't know how to change that. I want the widget to be displayed at the click event of a button.
Can someone please help me with this.

Thank you in advance.
Sonali

Output RecordSet - Geoprocessing Task

$
0
0
I was curious on how to change the column order to match a table that is being returned by a geoprocessing task instead of having the table be sorted alphabetically?

Thanks

Can I customize the path where I want to save the attachment???

$
0
0
Can I customize the path where I want to save the attachment???

Hello, could someone please explain me where are the attachment??? Maybe into my gdb?? Can I customize the path? Can I save on a different server to which the project is located?

I am using the Edit widget and version 3 of the flex viewer... to attach my information.

Thank you all for your support, without you this project would not be possible .. ;)

hash table does not return data in sharedDataupdate2

$
0
0
I have successfully achieved the widget communication following widget communication.pdf Prepared By: Robert J. Scheitlin. I have noticed one thing and it is that when sharedDataUpdated2 is fired the hash table does not contain any data, why it is so?. however when the sharedDataUpdated is fired than array collection data array contains the data. i have applied this lines of code in init function of basewidget:
AppEvent.addListener(AppEvent.DATA_PUBLISH, sharedDataUpdated);
AppEvent.addListener(AppEvent.DATA_SENT, sharedDataUpdated2);
fetchSharedData();

and in the sharedDataupdated2 i have following code:
var dataTable:Hashtable = event.data as Hashtable
however event.data does not contain any data and all of its key are empty as i checked in the debugger. therfore when i checked dataTable.find("KernelDensityData") IT RETURNS FALSE. there only sharedDataupDated returns the data but sharedDataupdated2 does not.
Any thought please.
regards
nadeem
Viewing all 2097 articles
Browse latest View live