POST
|
Here's what worked for me. I run this function from a button click protected function RefreshLayer_clickHandler(event:MouseEvent):void
{
/* protected function RefreshLayer_clickHandler(event:MouseEvent):void
{*/
map.removeLayer(featLayer)
map.addLayer(featLayer);
... View more
05-03-2011
05:42 AM
|
0
|
0
|
195
|
POST
|
By adding the following: public static var strSearchBmpId:String; private function sharedDataUpdated(event:AppEvent):void
{
var data:Object = event.data;
strSearchBmpId=data.collection[0].title.toString();
} I am then able to run a definitionExpression fLayer.definitionExpression = strSearchBmpId; which returns the value of the BMPID so that much seems to be functioning as I wish it to. I am not sure where in this mess I would insert a selectFeatures. Being as it's fairly late on a friday afternoon I'm not sure anything I try at this point is going to work. I suspect I've been close more than once today. I am working with the EditWithout Editor.MXML Think I'll try this again fresh on Monday morning. Thanks for responding.
... View more
03-25-2011
01:39 PM
|
0
|
0
|
698
|
POST
|
I am attempting to make an editor that limits the point that can be moved (OR ADDED if it doesn't already exist - but that's another problem)to one specific point from the feature service. I select that point by an attribute passed through a parameter in the URL to the search widget. It then zooms to that point. The search Result is shared data and I have a variable in the editWithoutEditor widget that reads the BMPID from the search results of the search widget. Right now the EditWithoutEditor selects points on a mapclick to the featureService. What I'm trying to do is use the shared data to select the point to move. Don't seem to be able to do this though it seems that it should be do-able. Looking for any ideas or suggestions that may point me in the right direction
... View more
03-25-2011
12:41 PM
|
0
|
3
|
1413
|
POST
|
Used the below code in an attempt to get searchResultAC from the search widget to use the BMPID in an edit widget right now I am getting the shared data at least as far as the sharedDataUpdated function--at least in debugger my BMPID displays as the title under the variables tab but I don't seem to be able to figure out how to display the shared data in an alert box...which isn't my ultimate goal but would get me closer to figuring out how to use the shared data. Widget 1
private function widgetCommunication1():void
{
addSharedData("your key", shared data(ArrayCollection));
}
Widget 2
<viewer:BaseWidget xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:viewer="com.esri.viewer.*"
initialize="basewidget1_initializeHandler(event)"
>
<fx:Script>
<![CDATA[
import com.esri.viewer.AppEvent;
import mx.events.FlexEvent;
protected function basewidget1_initializeHandler(event:FlexEvent):void
{
ViewerContainer.addEventListener(AppEvent.DATA_PUBLISH, sharedDataUpdated);
}
private function sharedDataUpdated(event:AppEvent):void
{
var data:Object = event.data;
if (data.key == "my key")
{
// do something..
}
}
]]>
</fx:Script>
Hope that helps.
... View more
03-24-2011
12:13 PM
|
0
|
0
|
449
|
POST
|
Working with moving points utilizing the editWithoutEditor.MXML. I can move points and when I refresh the browser the updated data is reflected. I'd like to be able to call just that layer and refresh it. Any hints if this is possible and if possible a push in the right direction would be greatly appreciated
... View more
03-22-2011
08:54 AM
|
0
|
2
|
337
|
POST
|
Beautiful! 🙂 Thank you and sorry for not mentioning what library I was working in in the first place.:)
... View more
03-14-2011
05:29 AM
|
0
|
0
|
79
|
POST
|
1120: Access of undefined property widgetStates. I'm using the 2.1 library if that makes a difference.
... View more
03-11-2011
09:21 AM
|
0
|
0
|
434
|
POST
|
I'm attempting to call it from within the search widget.
... View more
03-11-2011
08:06 AM
|
0
|
0
|
434
|
POST
|
When I add these lines I get the error message in the attachment which generally seems to mean I need an import statement but don't seem to be able to figure out which one I need here. Any clue would be greatly appreciated.
... View more
03-11-2011
07:53 AM
|
0
|
0
|
434
|
POST
|
Rene; Thanks for responding. Where did you implement this code? Have made several attempts and not come up with the right answer. THough it looks like it shouldn't be as hard as I'm maknig it.
... View more
03-10-2011
05:29 AM
|
0
|
0
|
434
|
POST
|
I've set up my search widget to find a parameter from the URL and zoom to that feature. Once that goal has been accomplished I would like the widget to close automatically. Can it be done? Other option is changing all the pass parameters through URL into the mapManager and I;m trying not to go backwards from where I'm at.
... View more
03-09-2011
12:08 PM
|
0
|
10
|
2197
|
POST
|
The following is the one I was missing. Still doesn't zoom but it is finding the BMPID and placing an icon. Thank You very much. Sandra, //Add this line to the postConfigHandler function _configData = configData; //After this line var configData:ConfigData = event.data as ConfigData;
... View more
03-07-2011
01:07 PM
|
0
|
0
|
284
|
POST
|
This is what I have in ViewerContainer: I came to the conclusion this was where the error is but I can't see anything wrong and I've been over it so often I can't see straight anymore. public function getWidgetId(widgetLabel:String):Number { var id:Number; for (var i:Number = 0; i < _configData.widgets.length; i++) { if (_configData.widgets.label == widgetLabel) id = _configData.widgets.id; } return id; }
... View more
03-07-2011
12:49 PM
|
0
|
0
|
284
|
POST
|
I have been through the threads. I have changed the code according to URLSearch.txt in this thread and searched through a couple of other threads. The search finctionality works fine to locate my BMPID and zoom to it however when I try to pass the BMPID into the search function via the URL I'm getting the following error message. Any ideas or suggestions on what I may need to change? http://testgis.sd.gov/server/denr/bmpEdit1/index.html?BMPID=12 TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.esri.viewer::ViewerContainer/getWidgetId() at MethodInfo-223() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.utils::Timer/tick()
... View more
03-07-2011
10:32 AM
|
0
|
0
|
361
|
POST
|
I'm back again...Robert successfully talked me through this in the 1.3 library. I'm attempting to update to 2.x and my first problem comes when trying to load the SearchWidget I get an error #2036 Load Never Completed URL: file:///C:/inetpub/wwwroot/Copy%20of%20FlexViewer/bin-debug/ I've been through the forums and nothing seems to get rid of this error.
... View more
02-23-2011
10:00 AM
|
0
|
0
|
361
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|