|
POST
|
I've searched the forum and haven't seen anything very descriptive about this but... and this is more of a straight up Flex (4) question than the AGS API... Is there a way to save out current app settings, such as current map center, map scale, visible layers, etc... to a client side XML file or some such... to be loaded back up later when the user re-initializes the app from that pc? Thanks, -r
... View more
09-10-2010
08:22 AM
|
0
|
8
|
1268
|
|
POST
|
I've got an Editor going in an app. I can add new features and see them when done editing but when I invoke the editor again, the features do not display. If I kill the editor, they show up again. If I delete the local browser cache (while still in the app), the features show up correctly during editing. This seems to only happen in IE... Is there some sort of browser cache setting either on the service, in Flex or in the browser settings that can be adjusted, or something else going on? -r
... View more
08-27-2010
06:54 AM
|
0
|
2
|
3433
|
|
POST
|
Solved. I went into the template.html file for a Flex 3 app and found: <body scroll="no"> I replaced the <body> tag in the Flex 4 app with the above and now, no scrollbars. 🙂 -r
... View more
08-26-2010
07:28 AM
|
0
|
0
|
362
|
|
POST
|
I've got an app that works properly in Firefox and Chrome but when I open it in IE I get scrollbars at the edge of the app. If I open the app SWF directly in IE I get no scrollbars, which is what I want. Has anyone run into this? What is going on in the template.html file that is causing these unwanted scrollbars? Thanks much, -Royce
... View more
08-24-2010
01:20 PM
|
0
|
2
|
1079
|
|
POST
|
Thanks! Works now. Needed to add the "= null" assignments and then add the stuff for assigning back the map and feature layers. Do you think this is a decent solution or would it be better to only have one editor and do some skinning with the TabNavigator? I like this because it separates out the editing of each of the layers. Gives the user more fine grained control..
... View more
07-29-2010
07:31 AM
|
0
|
0
|
607
|
|
POST
|
Hi Sarthak, I actually am using the editors in each tab for editing. So, instead of having each of the three feature layers come up in a single editor where the user would have to scroll down through the layers and each layer's designated templates to get to the features they want, I'd like to break out the three feature layers into their own editors and put each of those into their own tab in tab navigator. Hopefully that makes sense. As an example, if you take a look at the ESRI Editing "Editor with toolbar" sample, there are two feature layers: "points of interest" and "fire perimeter". If I wanted to break up those two layers to be handled by two separate editors in a tab navigator where one tab got "points of interest" and the other tab got "fire perimeter"... how would you go about best implementing that such that when you invoked the editor on each tab, the other editor isn't activated at the same time? I'll see if one of my sys admins will open up the server to be accessible from outside the firewall so you can inspect things directly. -r
... View more
07-27-2010
03:33 PM
|
0
|
0
|
607
|
|
POST
|
I've got three feature layers (point, line and polygon) that I'd like to split out into three different editors so that I can have each editor in it's own tab in a Tab Navigator. I've implemented the following mxml: <mx:TabNavigator id="tabNavigator" width="251" height="347" x="10" y="10" change="setEditor(event)" creationPolicy="auto"> <s:NavigatorContent id="pointsTab" label="Points" width="100%" height="100%"> <esri:Editor id="pointsEditor" height="100%" width="100%" map="{map}" toolbarVisible="true" featureLayers="{[map.getLayer('TypePointsLayer') as FeatureLayer]}"/> </s:NavigatorContent> <s:NavigatorContent id="linesTab" label="Lines" width="100%" height="100%" > <esri:Editor id="linesEditor" height="100%" width="100%" map="{map}" toolbarVisible="true" featureLayers="{[map.getLayer('TypeLinesLayer') as FeatureLayer]}"/> </s:NavigatorContent> <s:NavigatorContent id="areasTab" label="Areas" width="100%" height="100%" > <esri:Editor id="areasEditor" height="100%" width="100%" map="{map}" toolbarVisible="true" featureLayers="{[map.getLayer('TypePolysLayer') as FeatureLayer]}" geometryService="{new GeometryService(_geometryURL)}"/> </s:NavigatorContent> </mx:TabNavigator> The problem is, as I go from one tab to the next, each editor becomes active and editing mayhem kicks in. So, I added a "change event" to the tab navigator with the following code: private function setEditor(event:IndexChangedEvent):void { for each (var layer:Layer in map.layers) { if (layer is FeatureLayer) { var fl:FeatureLayer = layer as FeatureLayer; if (fl.selectedFeatures.length > 0) { fl.clearSelection(); } } } var i:int = event.target.selectedIndex; switch(i) { case 0: { if(linesEditor) { linesEditor.editTool.deactivate(); linesEditor.templatePicker.clearSelection(); } if(areasEditor) { areasEditor.editTool.deactivate(); areasEditor.templatePicker.clearSelection(); } break; } case 1: { if(pointsEditor) { pointsEditor.editTool.deactivate(); pointsEditor.templatePicker.clearSelection(); } if(areasEditor) { areasEditor.editTool.deactivate(); areasEditor.templatePicker.clearSelection(); } break; } case 2: { if(pointsEditor) { pointsEditor.editTool.deactivate(); pointsEditor.templatePicker.clearSelection(); } if(linesEditor) { linesEditor.editTool.deactivate(); linesEditor.templatePicker.clearSelection(); } break; } } } This doesn't work for some reason. The "deactivate" method on the editTool for the editors that I'd like to "disable" don't seem to do any deactivating. For example if I have the "line editor" tab active, I'd like to deactivate the "point editor edittool" and "poly editor edittool" so that the user can't click/select/edit existing points or polys. Maybe there is a better approach to doing this. Thanks for any advice. -r
... View more
07-27-2010
01:59 PM
|
0
|
5
|
1053
|
|
POST
|
You could call http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/symbols/Symbol.html#createSwatch() or pass the ByteArray to the Flex Image component as it's source. Thanks Dasa, I've got the ByteArray working... what would be an example usage of the createSwatch method? How would I use the resulting object as the source from an Image?
... View more
07-02-2010
07:47 AM
|
0
|
0
|
523
|
|
POST
|
Here is more verbose code snippet for what I was doing successfully at beta update3... protected function titlewindow1_creationCompleteHandler(event:FlexEvent):void { emLayerList.selectedIndices = selectedIndices; emAssetLayer.getAllDetails(new AsyncResponder(onResult, onFault)); } private function onResult(allDetailsResult:AllDetails, token:Object = null):void { _emLayerDetails=allDetailsResult.layersDetails; _emLayerListDataProvider = new ArrayCollection; for each (var o:Object in _emLayerDetails) { var item:Item = new Item; item.layerID = o.id; item.name = o.name; if (o.geometryType == "esriGeometryPoint") { item.legendImage = o.drawingInfo.renderer.symbol.source; } _emLayerListDataProvider.addItem(item); } }
... View more
07-01-2010
02:14 PM
|
0
|
0
|
523
|
|
POST
|
At beta, update 3, I was doing with success... item.legendImage = o.drawingInfo.renderer.symbol.source; to get the image source url string for point features. Now the "source" property returns a ByteArray and crashes the app. I was using the string to populate a custom Item object as show above. Then using the item in a List object for a custom legend/TOC. How can I do the same thing now with a ByteArray? I notice that what used to be a url with PNG file is now like this: "http://hiatus/ArcGIS/rest/services/dev/EM_Assets/MapServer/32/images/C8D05CC1" Anyway, I'd just like to be able to use the drawinginfo property (or whatever property would have the image path for point features) for the point symbol. Thanks much.
... View more
07-01-2010
02:11 PM
|
0
|
4
|
1969
|
|
POST
|
When you create a layer in ActionScript, it's id is initially null. You can set it or the API will set it to a generic value. In MXML the id is set for you by the MXML compiler. Wow, ok, I've been at this for some time now and didn't realize that the ID and the variable name were not the same thing and that you have to expicitly set the ID separately from naming the variable. Will try that out.
... View more
06-17-2010
06:59 AM
|
0
|
0
|
411
|
|
POST
|
Hi Robert, I've got a dynamic map service with ID of "editsLayer" that I created and instantiated in actionscript as a module level variable. I added an event listener to it: editsLayer.addEventListener(LayerEvent.LOAD_ERROR, onMapServiceLoadError); Then, in order to test the "onMapServiceLoadError" function, I stop the map service, run the app with a breakpoint in the below function. I inspect the "event" object and nowhere in there is reference to the layer ID "editsLayer". I only see the generic id "ArcGISDynamicMapServiceLayer22" as you noted. In order to meaningfully have an Alert message such as the one below, I'd like to be able to see the actual ID of the layer that errored out and not the generic ID. private function onMapServiceLoadError(event:LayerEvent) : void { Alert.show("Failure loading Map Service: " + event.layer.id ....); }
... View more
06-17-2010
06:47 AM
|
0
|
0
|
411
|
|
POST
|
I've got a loadError event defined this way: editsLayer.addEventListener(LayerEvent.LOAD_ERROR, onMapServiceLoadError); I'd like the onMapServiceLoadError function to be able to retrieve the name of the originating object, in this case "editsLayer", but what gets returned is "ArcGISDynamicMapServiceLayer22". I've looked over the event object (event.target..., event.layer...) and can't find any reference to "editsLayer" Id. What concept am I missing here? Thanks.
... View more
06-16-2010
02:06 PM
|
0
|
4
|
629
|
|
POST
|
This is a known issue with the 1.x APIs. As of 2.0 Beta Update 3, they still seem to come out in random order, unfortunately.
... View more
06-08-2010
07:57 AM
|
0
|
0
|
270
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-21-2020 10:08 AM | |
| 1 | 05-30-2018 02:39 PM | |
| 5 | 02-13-2015 10:07 AM | |
| 3 | 12-03-2019 09:48 AM | |
| 1 | 10-22-2015 01:15 PM |
| Online Status |
Offline
|
| Date Last Visited |
03-24-2021
06:29 PM
|