POST
|
Is there a way to reference the widgetBox or is this line of logic a not the way to truely close a widget? I am having issues with my program because i can not really close a widget. Thanks. Tyler
... View more
06-13-2011
04:55 AM
|
0
|
0
|
309
|
POST
|
Thanks Robert. Where would my projects be without your replies to my and other people's posts? I have loaded this function into the WidgetManager but widgetBox is not declared in the WidgetManager (Flex Viewer 2.2). Any suggestions?
... View more
06-08-2011
10:04 AM
|
0
|
0
|
309
|
POST
|
Thanks for the reply. I have a bunch of config.xml files that I can generate different applications with. However, what if I want to switch between config.xml files at runtime? I would like to change between profiles elegantly within the flex viewer. Is this possible? Thanks, Tyler
... View more
06-08-2011
04:38 AM
|
0
|
0
|
390
|
POST
|
Greetings. This is a continuation of the origional post "Really Close a Widget" (http://forums.esri.com/thread.asp?c=158&f=2421&t=302669). Great stuff. However there are a few conceptual leaps required by the solution that I am not yet equiped to make. The Solution: public function closeWidget(id:Number, url:String):void { if (widgetTable.containsKey(id)) { var widget0:IBaseWidget = widgetTable.find(id) as IBaseWidget; var wObj0:DisplayObject = widget0 as DisplayObject; widgetTable.remove(id); if(widgetBox.contains(wObj0)) widgetBox.removeChild(wObj0); } if (moduleTable.containsKey(url)) { var modInfo:IModuleInfo = moduleTable.find(url) as IModuleInfo; moduleTable.remove(url); modInfo.unload(); } } Conceptual Leaps: 1. Where does this funciton belong. 2. How do you reference the widgetTable and moduleTable 3. How do you reference the widgetBox. I realize that this is probably pretty complex to explain so any more hints to get me in the right direction will be greatly appreciated. ViewerContainer.dispatchEvent(new AppEvent(AppEvent.WIDGET_CHANGE_STATE, {id: this.widgetId, state:WidgetStates.WIDGET_CLOSED})); is not the appropriate way to close the widget if you wish to reloas the config file. Thanks, Tyler
... View more
06-07-2011
06:39 PM
|
0
|
5
|
1780
|
POST
|
Thanks for forwarding along the link. I am interested in learning how to to change the Flex Viewer's main config.xml file at run time. This was not detailed in the documentation regarding the comfig.xml file. Is it possible? Thanks, Tyler
... View more
06-03-2011
05:22 AM
|
0
|
0
|
390
|
POST
|
Greetings, The link above seems to be broken. I am looking for documentation on the main config file for Flex Viewer 2.3.1. Thanks, Tyler
... View more
05-25-2011
07:03 AM
|
0
|
0
|
390
|
POST
|
Greetings Everyone, I am working on updating our site for version 2.2 and am missing the external links menu from the previous version. Has anyone worked out a good way to handle multiple external links in the FlexViewer 2.2? Thansk, Tyler Wairing
... View more
03-10-2011
09:19 AM
|
0
|
1
|
492
|
POST
|
Greetings Everyone, I am starting to transition my code from FlexViewer 1.X and have run into a problem with InfoPopup.xml. In the previous version the InfoPopop had a nice visible box, 'x' button when you moused over a graphic and Red_glow.swf would kick in. In FelxViewer 2.2 some cream colored text shows up but the container of InfoPopup is not visible and the red glow does not engage. How do I get the InfoPopup in FlexViewer 2.2 to behave simelarly to the InfoPopup in FlexViewer 1.X? Thanks, Tyler P.S. Please see attached graphics.
... View more
01-19-2011
06:58 AM
|
0
|
3
|
1578
|
POST
|
So I can�??t really say why this misalignment occurs but it does seem to be associated how the tiles of the ArcGISTiledMapServiceLayer are drawn. I tried a number of things to get around this. Refreshing the ArcGISTiledMapServiceLayer alone did not did not seem to do anything. However, when utilized setTimeout() to time a function to refresh this layer a half second after it�??s visibility was changed to true, then everything seemed to work out just fine. Hope this helps. Tyler
... View more
12-02-2010
09:33 AM
|
0
|
0
|
297
|
POST
|
Greetings Everyone, I am working on a tool to save projects or sessions in the Flex Viewer application. I am pretty close at this point but I am having a problem with the tiled and dynamic map services overlaying incorrectly. When I load the map settings for each different session, the dynamic layers do not initially overlay the tiled layers correctly. The tiled layers are always significantly offset from the dynamic layers (notice how the building footprints and stereets do not overlay the ortho photo proprely). When I reload the session the second time however, everything aligns correctly. This leaves me to believe that I am calling a method out of order when a tiled layer is turned on. I have included my code below and attached a graphic of the misaligned dynamic and tiled layers. Does anyone recognize any errors? Thanks, Tyler Waring
public function loadSavedSession(session:Object):void
{
SiteContainer.addEventListener(AppEvent.SAVED_SESSION_APPLIED, SavedSearchCleanUpSteps)
//get service and layer visability from the session object
var strAllFinalVisibleServicesAndArrays:String = session.strVisLayers;
var aryAllVisibleServicesAndLayers:Array = strAllFinalVisibleServicesAndArrays.split("!@!");
trace("Session visible Layers = " + session.strVisLayers)
var aryServiceLayerNames:Array = new Array;
//create an array of visible services
for (var i:int = 0; i<aryAllVisibleServicesAndLayers.length; i++)
{
trace("session layers + " + aryAllVisibleServicesAndLayers);
var strServiceArray:String = aryAllVisibleServicesAndLayers;
var serviceArray:Array = strServiceArray.split("|");
aryServiceLayerNames.push(serviceArray[1]);
}
//loop over layers and change their visibility
var intServiceLayerIndex:int;
var myDynamicServiceLayer:ArcGISDynamicMapServiceLayer;
var myTiledServiceLayer:ArcGISTiledMapServiceLayer;
var serviceName:String;
var strLayers_alpha:String;
var aryLayersName:Array = new Array;
var aryLayersAlpha:Array = new Array;
var ext:Extent = new Extent(session.xmin, session.ymin, session.xmax, session.ymax);
for each(var layer:Layer in map.layers)
{
var strLayerSettings:String;
var aryLayerSettings:Array;
var acExistingVisibleLayers:ArrayCollection;
var aryExistingVisibleLayers:Array;
var acNewVisibleLayers:ArrayCollection;
var strNewVisibleLayers:String;
var aryNewVisibleLayers:Array;
var blDispatchVisibilityChanged:Boolean = false;
var nmTurnedOffID_ServiceName:String;
if (layer is ArcGISDynamicMapServiceLayer)
{
myDynamicServiceLayer = ArcGISDynamicMapServiceLayer(layer);
serviceName = getServiceNameFromURL(myDynamicServiceLayer.url);
intServiceLayerIndex = aryServiceLayerNames.indexOf(serviceName);
//if the layer is turned on in the session object then...
if (intServiceLayerIndex >-1)
{
//get the settings for this service as they are defined by the session object.
strLayerSettings = aryAllVisibleServicesAndLayers[intServiceLayerIndex];
//create an array these settings.
aryLayerSettings = strLayerSettings.split("|");
trace("aryLayerSettings = " + aryLayerSettings.toString())
// if this layer is not visible then turn it on.
if (myDynamicServiceLayer.visible == false)
{
myDynamicServiceLayer.visible = true;
}
//get a list of layers that are currently visible for this service
acExistingVisibleLayers = myDynamicServiceLayer.visibleLayers;
aryExistingVisibleLayers = acExistingVisibleLayers.source;
//get the layers that are visible for this serivce as defined in the session object.
strNewVisibleLayers = aryLayerSettings[3];
aryNewVisibleLayers = strNewVisibleLayers.split(",");
//convert the array of visible layers from strings to integers
var aryFinalVisibleLayers:Array = new Array
for (var intVisLyr:int = 0; intVisLyr < aryNewVisibleLayers.length; intVisLyr++)
{
aryFinalVisibleLayers.push(int(aryNewVisibleLayers[intVisLyr]))
}
//convert the integer array of visible layers to an array collection
acNewVisibleLayers = new ArrayCollection(aryFinalVisibleLayers);
trace("aryExistingVisibleLayers = " + aryExistingVisibleLayers.toString() + " aryNewVisibleLayers = " + aryFinalVisibleLayers.toString())
//if the visiblity of the layers in this service are not the same as the visibility of the layers in the session object...
if(myDynamicServiceLayer.visibleLayers != acNewVisibleLayers)
{
//set the visible layers in this service = to the visible layers in the session object.
myDynamicServiceLayer.visibleLayers = acNewVisibleLayers;
myDynamicServiceLayer.refresh();
blDispatchVisibilityChanged = true;
}
//change the alpha value of this service if it differs from the alpha value recorded in the session object.
if (layer.alpha != aryLayerSettings[2])
{
layer.alpha = aryLayerSettings[2];
//the following event is listened for in LiveMapsWidget.mxml in the iMaps directory
SiteContainer.dispatchEvent(new AppEvent(AppEvent.LAYER_ALPHA_CHANGED, false, false));
}
//if the visibility was changed then send out messages to other widgets to update their settings.
if (blDispatchVisibilityChanged == true)
{
for (var iNew:int = 0; iNew<aryFinalVisibleLayers.length; iNew++)
{
if (aryExistingVisibleLayers.indexOf(aryFinalVisibleLayers[iNew])== -1)
{
nmTurnedOffID_ServiceName = aryFinalVisibleLayers[iNew]+"_"+serviceName;
trace(nmTurnedOffID_ServiceName);
SiteContainer.dispatchEvent(new AppEvent(AppEvent.LAYER_VISIBILITY_CHANGED, false, false, nmTurnedOffID_ServiceName))
}
else
{
aryExistingVisibleLayers.splice(aryExistingVisibleLayers.indexOf(aryFinalVisibleLayers[iNew]),1)
}
}
for (var iExisting:int = 0; iExisting<aryExistingVisibleLayers.length; iExisting++)
{
nmTurnedOffID_ServiceName = aryExistingVisibleLayers[iExisting]+"_"+serviceName;
trace(nmTurnedOffID_ServiceName);
SiteContainer.dispatchEvent(new AppEvent(AppEvent.LAYER_VISIBILITY_CHANGED, false, false, nmTurnedOffID_ServiceName))
}
}
}
else //if this service layer is not listed in the session object then turn it off.
{
layer.visible = false;
}
}
else if (layer is ArcGISTiledMapServiceLayer)
{
myTiledServiceLayer = ArcGISTiledMapServiceLayer(layer);
serviceName = getServiceNameFromURL(myTiledServiceLayer.url);
intServiceLayerIndex = aryServiceLayerNames.indexOf(serviceName);
trace(aryServiceLayerNames.toString())
//if this service is on in the session object then turn it on
if (intServiceLayerIndex >-1)
{
myTiledServiceLayer.visible = true;
myTiledServiceLayer.refresh();
}
else
{
myTiledServiceLayer.visible = false;
myTiledServiceLayer.refresh();
}
}
}
SiteContainer.dispatchEvent(new AppEvent(AppEvent.SAVED_SESSION_APPLIED, false, false));
map.extent = ext;
}
... View more
11-22-2010
09:13 AM
|
0
|
2
|
1985
|
POST
|
Thanks, That's exactly what I needed. Thanks for finding the right size solution for my problem. I am curious though, how do you integrate the Shape Comparison Language with a Flex applicaiton using GeometryService.SPATIAL_REL_RELATION? It sounds both interesting and powerful. Any information will be greatly appreciated. Tyler
... View more
11-10-2010
08:48 AM
|
0
|
0
|
184
|
POST
|
Greetings Everyone, I have been struggling to figure out how to perform a spatial test on a graphics layer and a featureset. What I am trying to do is extend the graphical search functionality in the search widget so that a user can press the ???A??? key and add additional features to both the graphics layer and the RecordData class object. I have figured the main functions for this extension but now I am finding that if the added features overlap the existing graphics layer then duplicates will be produced in both the graphics layer and the RecordData class object. To overcome this problem, I would like to use compare the existing in map graphicslayer to the new featureset that is produced when an additional graphical query is made. I think I am looking to use a GeometryService.relation method with the spatialRelationship parameter set to SPATIAL_REL_RELATION. However I have no Idea how to set up the comparisonString. I???ve tried to jump into the Shape Comparison Language documentation but I must admit that it is completely over my head. I have tried my best to generate the correct parameters but I am obviously doing something wrong. Here is what I???ve got: myGeometryService.relation(compareArray1, compareArray2,GeometryService.SPATIAL_REL_RELATION,"compareArray1 != compareArray2") The Error I get whilst running this method is: [FaultEvent fault=[RPC Fault faultString="Object reference not set to an instance of an object." faultCode="500" faultDetail="Unable to perform the relation operation"] messageId=null type="fault" bubbles=false cancelable=true eventPhase=2] Does anyone know what I may be doing wrong? Thanks Tyler Waring
... View more
11-05-2010
12:03 PM
|
0
|
3
|
551
|
POST
|
Greetings. I am working on implementing design patterns in my customizations of the Simple Flex Viewer and future customizations of the new Viewer for Flex 2.0. What design patterns were used to develop both of these flex viewers? Thanks, Tyler
... View more
10-19-2010
07:11 AM
|
0
|
1
|
861
|
POST
|
Greetings Folks, This code is from an old tool. Rather than use setMapAction this entire issue can be sidestepped by using a button toolbar. There is a great example on the ESRI samples site that shows you how to create and implement the button toolbar. http://resources.esri.com/help/9.3/arcgisserver/apis/flex/samples/index.html. Though I'm still not sure why I can't get my shift zoom functionality back as the tool was originally designed using setMapAction. Thanks, Tyler
... View more
09-02-2010
05:01 AM
|
0
|
0
|
128
|
POST
|
Greetings everyone, The shift zoom functionality is disappearing after using setMapAction(). Here is a scaled back version of a search tool that I am having a problem with. I must be missing something simple. Any ideas? Thanks, Tyler Waring private function activateSearchTool(value:String):void { var status:String; var btn:Image; trace(value) switch (value) { case Draw.MAPPOINT: { setMapNavigation("pan", "Move Map"); status = "Search by Point"; setMapAction(value, status, searchDrawEnd); btnSearchMapPoint.source = mapPointSourceActive; btnSearchMapPoint.toolTip = strStatusMapPointDeactivate; map.panEnabled = false; } } } private function deactivateSearchTool(value:String):void { var status:String; var btn:Image; trace(value) switch (value) { case Draw.MAPPOINT: { status = "Move Map"; setMapNavigation("pan", status); btnSearchMapPoint.source = mapPointSource; btnSearchMapPoint.toolTip = strStatusMapPoint //status = strStatusPoint; map.panEnabled = true; } } }
... View more
09-01-2010
06:35 AM
|
0
|
1
|
344
|
Title | Kudos | Posted |
---|---|---|
1 | 07-28-2016 03:05 PM | |
4 | 09-20-2017 11:37 AM | |
2 | 01-28-2019 12:21 PM | |
1 | 10-16-2017 12:56 PM | |
1 | 10-07-2014 07:04 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|