|
POST
|
Try also setting this to false: http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/Map.html#mapNavigationEnabled
... View more
06-18-2010
09:17 AM
|
0
|
0
|
1526
|
|
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.
... View more
06-17-2010
06:50 AM
|
0
|
0
|
478
|
|
POST
|
You need to set the UniqueValueRenderer's defaultSymbol to be used by the other observations. If a renderer returns null, the graphic is not drawn.
... View more
06-16-2010
08:06 AM
|
0
|
0
|
402
|
|
POST
|
Try changing to this in your config: <mapservice label="CUSD Map" type="dynamic" visible="true" alpha="1.0">http://cusdmaps.cusd.com/ArcGIS/rest/services/CUSD_Mapflex4/MapServer</mapservice>
... View more
06-15-2010
12:38 PM
|
0
|
0
|
454
|
|
POST
|
I got this security error: SecurityError: Error #2048: Security sandbox violation: http://cusdmaps.cusd.com/flex3/index.swf cannot load data from http://cusdmaps/ArcGIS/rest/services/CUSD_Mapflex4/MapServer?f=json. Looking at the requests, I'm unable to load: http://cusdmaps/crossdomain.xml
... View more
06-15-2010
12:34 PM
|
0
|
0
|
454
|
|
POST
|
You could set the latestObservationRenderer and observationRenderer to instances of UniqueValueRenderer, where the UniqueValueRenderer has a defaultSymbol used by most observations and then a UniqueValueInfo with the symbol to use for a particular observation. For the latestObservationRenderer, you could set the UniqueValueInfo.attribute to be the object id field name and then set the corresponding value in the UniqueValueInfo. For the observationRenderer's UniqueValueRenderer, you'd need to set the attribute to some kind of track id field that is common to all the features in a track. Once you have the renderer set up, you can make the FeatureLayer redraw by resetting it on itself. featureLayer.renderer = featureLayer.renderer; Another option is to create a custom Renderer class that can return the symbol you want based on your own logic.
... View more
06-15-2010
12:29 PM
|
0
|
0
|
402
|
|
POST
|
And this one: http://forums.esri.com/Thread.asp?c=158&f=2421&t=272964
... View more
06-15-2010
09:45 AM
|
0
|
0
|
285
|
|
POST
|
See this post: http://forums.esri.com/Thread.asp?c=158&f=2421&t=267613#824336
... View more
06-15-2010
09:43 AM
|
0
|
0
|
285
|
|
POST
|
Make sure you have an import statement for it. import com.esri.ags.tasks.FeatureSet; http://resources.esri.com/help/9.3/arcgisserver/apis/flex/apiref/com/esri/ags/tasks/FeatureSet.html
... View more
06-14-2010
08:55 AM
|
0
|
0
|
410
|
|
POST
|
Just a small clarification... you don't actually need to create empty strings at unused indexes. It's OK to use a sparse array like this:
<mx:Script>
<![CDATA[
private function test():void
{
var dynLay:ArcGISDynamicMapServiceLayer = myMap.getLayer("Region") as ArcGISDynamicMapServiceLayer;
var layerDefArr:Array = new Array();
layerDefArr[5] = "OBJECTID=1";
dynLay.layerDefinitions = layerDefArr;
}
]]>
</mx:Script>
... View more
06-11-2010
09:23 AM
|
0
|
0
|
1215
|
|
POST
|
The Component tag defines a new scope. It's like have a separate mxml file, but putting it inline. Try moving the DateFormatter inside the Component. Reference: http://livedocs.adobe.com/flex/3/langref/mxml/component.html
... View more
06-10-2010
04:01 PM
|
0
|
0
|
751
|
|
POST
|
No, you just need to require Flash Player 10. In the Compiler section of your project's properties, change "Require Flash Player version" to 10 0 0.
... View more
06-10-2010
08:41 AM
|
0
|
0
|
1995
|
|
POST
|
Unfortunately, REST does not support that: http://resources.esri.com/help/9.3/arcgisserver/apis/rest/candidates.html
... View more
06-09-2010
07:20 AM
|
0
|
0
|
368
|
|
POST
|
Now that Navigation has been sparkified, it'd be best to just use a custom skin to add your buttons. The source files for the skins are in the skins folder in the API zip file. Here's an example where I copied the NavigationSkin to a skins folder in my project and modified it.
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2010 ESRI
All rights reserved under the copyright laws of the United States
and applicable international laws, treaties, and conventions.
You may freely redistribute and use this sample code, with or
without modification, provided you include the original copyright
notice and use restrictions.
See use restrictions in use_restrictions.txt.
-->
<!---
The default skin class for the Navigation component.
-->
<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:esri="http://www.esri.com/2008/ags">
<fx:Metadata>
/**
* A strongly typed property that references the component to which this skin is applied.
*/
[HostComponent("com.esri.ags.components.Navigation")]
</fx:Metadata>
<fx:Declarations>
<!--- @private -->
<mx:NumberFormatter id="numberFormatter" rounding="nearest"/>
<esri:NavigationTool id="navTool" map="{hostComponent.map}"/>
</fx:Declarations>
<fx:Script>
<![CDATA[
import com.esri.ags.layers.supportClasses.LOD;
private function formatSliderDataTip(value:Number):String
{
const lod:LOD = hostComponent.map.lods[value];
return lod ? "1:" + numberFormatter.format(lod.scale) : "Error";
}
]]>
</fx:Script>
<s:states>
<s:State name="normal"/>
<s:State name="disabled"/>
<s:State name="normalWithSlider"/>
<s:State name="disabledWithSlider"/>
</s:states>
<s:Rect bottom="0"
left="0"
radiusX="10"
radiusY="10"
right="0"
top="0">
<s:fill>
<s:SolidColor alpha="0.5" color="0x000000"/>
</s:fill>
</s:Rect>
<s:VGroup gap="2"
horizontalAlign="center"
minHeight="34"
paddingBottom="5"
paddingLeft="3"
paddingRight="3"
paddingTop="4">
<s:Button id="zoomInButton"
enabled.disabled="false"
enabled.disabledWithSlider="false"
skinClass="com.esri.ags.skins.NavigationZoomInButtonSkin"
toolTip="{resourceManager.getString('ESRIMessages', 'zoomInTooltip')}"/>
<mx:VSlider id="slider"
dataTipFormatFunction="formatSliderDataTip"
dataTipPlacement="right"
enabled.disabled="false"
enabled.disabledWithSlider="false"
enabled.normalWithSlider="true"
height="160"
includeIn="normalWithSlider,disabledWithSlider"
liveDragging="false"
maximum="{hostComponent.map.lods.length - 1}"
showDataTip="true"
snapInterval="1"
tickColor="#000000"
tickInterval="1"
tickLength="3"
tickOffset="-3"
tickThickness="1"
value="{hostComponent.map.level}"/>
<s:Button id="zoomOutButton"
enabled.disabled="false"
enabled.disabledWithSlider="false"
skinClass="com.esri.ags.skins.NavigationZoomOutButtonSkin"
toolTip="{resourceManager.getString('ESRIMessages', 'zoomOutTooltip')}"/>
<s:Button click="navTool.zoomToFullExtent()" label="Full"/>
</s:VGroup>
</s:Skin>
Here's how you can then use it in your app.
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:esri="http://www.esri.com/2008/ags">
<fx:Style>
@namespace esri "http://www.esri.com/2008/ags";
esri|Navigation
{
skin-class: ClassReference("skins.NavigationSkin");
}
</fx:Style>
<esri:Map>
<esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
</esri:Map>
</s:Application>
... View more
06-08-2010
09:14 AM
|
0
|
0
|
405
|
|
POST
|
Thanks for this test case. This does appear to be a bug in the Map. The zoom control is actually setting the map's level. Did my earlier solution work? Here's a workaround if you still want to use scale.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:esri="http://www.esri.com/2008/ags">
<mx:Script>
<![CDATA[
import com.esri.ags.layers.supportClasses.LOD;
protected function setMapScale(value:Number):void
{
for each (var lod:LOD in map.lods)
{
if (lod.scale == value)
{
map.level = lod.level;
break;
}
}
}
]]>
</mx:Script>
<mx:Number id="testScale">2000000</mx:Number>
<mx:HBox>
<mx:Button label="Set Map Scale to: {testScale}" click="setMapScale(testScale)"/>
<mx:Label text="Map Scale: {map.scale}"/>
</mx:HBox>
<esri:Map id="map" extentChange="trace(event)">
<esri:ArcGISTiledMapServiceLayer
url="http://213.225.144.91/arcgis_gps_staging/rest/services/PlacesIMFMapping/MapServer"/>
</esri:Map>
</mx:Application>
... View more
06-08-2010
08:38 AM
|
0
|
0
|
586
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-06-2017 01:13 PM | |
| 2 | 03-06-2017 02:12 PM | |
| 1 | 06-22-2010 12:01 PM | |
| 1 | 08-06-2012 09:29 AM |
| Online Status |
Offline
|
| Date Last Visited |
04-15-2025
04:18 PM
|