I am having trouble getting a secure service to work correctly.
I have a secured map service (added it to the Authenticated Users group in AGS 10.0 Server Manager) and generated a token. I can know navigate to it here:
Which seems all good, however when I try add this into my Flex application I get this error: Attachment 21382
My config is setup like this:
<layer label="Test" type="dynamic" visible="false" alpha="0.7" token="jg7PRrPINRwItQRFtCLKEeNTvJBKbcjhPaGFZnufNqw7QFbN-N_Ou_JkoN1UJvIn"
url="http://gis.mstn.govt.nz/ArcGIS/rest/services/Cadastral/Test/MapServer" />
Il est impossible d'accéder à la propriété ou à la méthode d'une référence d'objet nul.
Code:
at com.esri.ags.layers::ArcGISDynamicMapServiceLayer/loadMapImage()[C:\checkout\flex_api3\api\src\com\esri\ags\layers\ArcGISDynamicMapServiceLayer.as:1197]
at com.esri.ags.layers::DynamicMapServiceLayer/updateLayer()[C:\checkout\flex_api3\api\src\com\esri\ags\layers\DynamicMapServiceLayer.as:183]
at com.esri.ags.layers::Layer/updateLayerIfInvalid()[C:\checkout\flex_api3\api\src\com\esri\ags\layers\Layer.as:629]
at com.esri.ags.layers::Layer/updateDisplayList()[C:\checkout\flex_api3\api\src\com\esri\ags\layers\Layer.as:555]
at mx.core::UIComponent/validateDisplayList()
at mx.managers::LayoutManager/validateDisplayList()
at mx.managers::LayoutManager/doPhasedInstantiation()
at mx.managers::LayoutManager/doPhasedInstantiationCallback()
Hi,
I have a class that extends ArcGISDynamicMapServiceLayer (widget finddata geoportal)
Code:
public class GeoProcessingViewerLayer extends ArcGISDynamicMapServiceLayer
but I get an error flex on override function
1023: Incompatible override.
Code:
/**
* Sets the visible layers
*
* @arr Array of visible layers, just contains their ids
* */
override public function set visibleLayers(arr:ArrayCollection):void {
this._visibleLayers = arr;
if(arr && arr.length > 0) {
var layerInfos:Array = layerInfos;
var showPoints:Boolean = false;
var showLines:Boolean = false;
var showPolygons:Boolean = false;
for(var i:Number = 0; i < arr.length; i++) {
var index:Number = arr[i];
var layerInfo:GeoProcessingViewerLayerInfo = layerInfos[index] ;
if(layerInfo.title == lblPoints) {
showPoints = true;
} else if (layerInfo.title == lblPolygons) {
showPolygons = true;
} else if (layerInfo.title == lblLines) {
showLines = true;
}
}
geometryVisibility(showLines, showPoints, showPolygons);
} else {
this._map.removeLayer(this.graphicsLayer);
}
Does anybody know of a handy widget that shows what scale your map is at eg. 1:1,250 and ideally allows you to type in a scale and go to that scale? I would settle for just being able to see the scale as a starter. I'm just using the Application Builder version 3.0.
Thanks.
I want the last map service name added to the TOC MapSwitcherWidget to expand after the map/layer is added.
I can get all of them to expand using this
this.toc.expandLayerItems();
But I have tried all kinds of code to get that last item added to open but nothing works. It seems like one of these should work but it does not.
toc.expandChildrenOf(toc.firstVisibleItem,true);
toc.expandItem(toc.firstVisibleItem,true);
Forgot to add tried this also
this.toc.openItems.push(toc.firstVisibleItem);
I'm would like to customize the Query Widget 3.1 to display the return results with three different icons instead of a single icon (fire.png police.png ems.png) according to the values on the queried field.
<query> Agency_Type = 'F' OR Agency_Type = 'P' OR Agency_Type = 'M'</query>
Any help, suggestions, directions would be greatly appreciated.
I wonder if someone could help me understand how Flex Viewer and secure services work for ArcGIS and 10.0 and 10.1?
This is what I understand:
- ArcGIS Server 10.0 and Flex Viewer 2.x - I setup a secured service that authenticated users are only allowed to access. I add this layer into the config file with out a token, run the app and it comes up with an "unauthorized access" error in Flex Viewer
- ArcGIS Server 10.1 and Flex Viewer 3.x - I setup a secured service that authenticated users are only allowed to access. I add this layer into the config file with out a token, run the app and a login screen comes up and for each service that is secured.
This is with SQL server authentication, will it work the same with Windows authentication? Is there a way in ArcGIS Server 10.1 and Flex Viewer 2.x to config it so either a popup comes up or username/password is sent to the service, BUT not using a token?
I want to add a white background/halo to all text that is drawn (measurements and using "add text") inside the eDraw widget. Can someone please help me with this? I feel like it is probably easy if you know what you are doing, but I don't.
Any suggestions would be greatly appreciated. Thanks!
is there such a thing as a widget I can put in the widget container that you can click to simply open and external file or website? I currently have my "help" as a static image widget, but if I want to place the widget icon with the other icons, the user has to click it to open the Help widget, then click the help widget again to open the actual Help html file.
I can only get 2.5 or 3.1, 3.0 does not seem to be anywhere.
We have a 2.5 widget that uses locateTask.addressToLocations(myAddress, myOutFields, new AsyncResponder(onResult, onFault));
and this is totally different in 3.1 due to changes in 10.1.
But I want to see if this is also different in 3.0 or not. That might seal the deal on if we are going to use 3.0 or 3.1.
I am fairly new to using custom widgets. I have copied the compiled widget folder over and added the text the the config.xml file. The widget loads correctly in the viewer but I can not get it to detect any features in the map at all. Even with the <layers onlythese="false">. Any help would be greatly appreciated.
I try to use the legend widget for my dynamic layer but get the error message on LegendWidgetLegendSkin.mxml
For some reason, FlexViewer 3.1 uncompiled one didn't have LegendWidgeLegendSkin.mxml. So I added it and I can view the legend on rest services URL. I attached the files. Hope someone know how to solve this. Thank you.
I'm trying to incorporate the Selection widget into my ArcGIS Flex project (3.1) and I'm getting warnings about "Data binding will not be able to detect assignments to "length"." Any suggestions to alter the SelectByAttributes.mxml and SelectionResults.mxml file to resolve these? Warning: I'm a relatively new Flash Builder user.
I am wondering if there is a why I can customize the color scheme for both vector data stored in a mapservice and raster data stored in an image service?
Forgive me if this can be found in the documentation; I search but found nothing regarding it. Prior to versions 3.1.x if i included "All" at the beginning of a userlist the drop-down would auto-populate with "All" when the widget was launched. In the 3.1.x version no matter what I do I can not get the drop-down to auto-populate with any list item. Does this functionality still exist? I have attached a couple of screen shoots showing what I am talking about. Thanks for any help.
Changing the setting styles for the viewer more specifically the text color from 0xFFFFFF (white) to a dark color messes up the locate.png icon on the search box. Any suggestion on how to fix it?