var points:XMLList = gpxXML.descendants("trkpt");
Ashley
var points:XMLList = gpxXML.descendants("trkpt");
var params:Object = new Object();
params:Input_State = data; //simple comma separated string values
params:User_Name = txtUserName.text; //single string value
var gp:Geoprocessor = new Geoprocessor():
gp.showBusyCursor = true;
gp.url = "http://<ServerIP>:6080/arcgis/rest/services/<servicename>/GPServer/<taskname>";
gp.submitJob(params); //if I set the service to asynchronous
gp.execute(params); //if I set the service to synchronous; only one of these will be active in code at any one time
<map wraparound180="true" esrilogovisible="false" initialextent="1778634 5433543 1856528 5473165" fullextent="1778634 5433543 1856528 5473165" top="0" addarcgisbasemaps="false">
<basemaps>
<layer label="Imagery (2010)" type="tiled" visible="true"
icon="assets\images\basemap_imagery.png" url="http://gis.mstn.govt.nz/ArcGIS/rest/services/Basemaps/WairarapaImagery/MapServer"/>
</basemaps>
<operationallayers>
<layer label="Boundaries" type="dynamic" visible="true" alpha="0.7" url="http://gis.mstn.govt.nz/ArcGIS/rest/services/Cadastral/Boundaries/MapServer" />
</operationallayers>
</map>
TypeError: Error #1007: Instantiation attempted on a non-constructor.
at com.esri.ags.symbols::SimpleFillSymbol/updateStyleImpl()[C:\checkout\flex_api3\api\src\com\esri\ags\symbols\SimpleFillSymbol.as:437]
at com.esri.ags.symbols::SimpleFillSymbol/set style()[C:\checkout\flex_api3\api\src\com\esri\ags\symbols\SimpleFillSymbol.as:245]
at mx.binding::Binding/defaultDestFunc()
at Function/http://adobe.com/AS3/2006/builtin::call()
at mx.binding::Binding/innerExecute()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.binding::Binding/wrapFunctionCall()
at mx.binding::Binding/execute()
at mx.binding::BindingManager$/executeBindings()
at widgets.SelectBufferFind::SelectBufferFindWidget/_SelectBufferFindWidget_SimpleFillSymbol1_i()[C:\Data\Development\Projects\Wairarapa Combined District Map Viewer\Wairarapa Internal Viewer\src\widgets\SelectBufferFind\SelectBufferFindWidget.mxml:48]
at widgets.SelectBufferFind::SelectBufferFindWidget()[C:\Data\Development\Projects\Wairarapa Combined District Map Viewer\Wairarapa Internal Viewer\src\widgets\SelectBufferFind\SelectBufferFindWidget.mxml:48]
at _SelectBufferFindWidget_mx_core_FlexModuleFactory/create()[_SelectBufferFindWidget_mx_core_FlexModuleFactory.as:51]
at com.esri.viewer.managers::WidgetManager/createWidget()[C:\Data\Development\Projects\Wairarapa Combined District Map Viewer\Wairarapa Internal Viewer\src\com\esri\viewer\managers\WidgetManager.mxml:1052]
at com.esri.viewer.managers::WidgetManager/runWidget()[C:\Data\Development\Projects\Wairarapa Combined District Map Viewer\Wairarapa Internal Viewer\src\com\esri\viewer\managers\WidgetManager.mxml:1133]
at com.esri.viewer.managers::WidgetManager/widgetReadyHandler()[C:\Data\Development\Projects\Wairarapa Combined District Map Viewer\Wairarapa Internal Viewer\src\com\esri\viewer\managers\WidgetManager.mxml:1201]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at ModuleInfoProxy/moduleEventHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at ModuleInfo/readyHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::FlexModuleFactory/update()
at mx.core::FlexModuleFactory/docFrameHandler()
at mx.core::FlexModuleFactory/docFrameListener()
It appears to be something to do with the SimpleFillSymbol as if I remove the references to it out of the code it works, however it removes some of the necessary functions - it's a drawing tool. So I'm not quite sure what has changed between the Flex API 2.4 to 3.1 that may be causing an issue with this, any ideas?
private function createPopUp(url:String,layer:ArcGISDynamicMapServiceLayer,layerId:int):void
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, completeHandler);
loader.load(new URLRequest(url+"/"+layerId+"?f=json"));
function completeHandler(event:Event):void {
var loader:URLLoader = URLLoader(event.target);
var svc:Object = JSON.decode(loader.data);
var popupFields:Array = [];
var firstfield:String =null;
for each(var field:Object in svc.fields)
{
if(field.name=="OBJECTID"||field.name=="Shape_Length"||field.name=="Shape_Area" || field.name=="Shape")continue;
var popupFieldInfo:PopUpFieldInfo = new PopUpFieldInfo();
if(!firstfield)firstfield=field.name;
popupFieldInfo.fieldName = field.name;
popupFieldInfo.label = field.alias;
popupFieldInfo.visible = true;
popupFieldInfo.format = new PopUpFieldFormat();
popupFields.push(popupFieldInfo);
}
var popUpInfo:PopUpInfo = new PopUpInfo();
// Tell the pop-up info about the field name template
popUpInfo.title = "{"+firstfield+"}";
popUpInfo.popUpFieldInfos = popupFields;
// Create the class factory
var popUpRenderer:ClassFactory = new ClassFactory(PopUpRenderer);
// Set the "popUpInfo" key
popUpRenderer.properties = { "popUpInfo": popUpInfo };
var layerInfoWindowRenderer:LayerInfoWindowRenderer = new LayerInfoWindowRenderer();
layerInfoWindowRenderer.layerId = Number(layerId);
var infoWindowRenderer:ClassFactory = new ClassFactory(PopUpRenderer);
infoWindowRenderer.properties = { popUpInfo: popUpInfo };
var arrLayerInfoWindowRenderer:Array = [];
arrLayerInfoWindowRenderer.push(popUpRenderer);
layer.layerInfoWindowRenderers=arrLayerInfoWindowRenderer;
}
}