|
POST
|
It needs an instance. See this sample: http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=Renderer You could also put it in the Declarations and bind to it's id the way that sample is doing with the symbols. You can also put the symbols inline like in this sample: http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=FeatureLayerWithTooltips
... View more
10-05-2010
02:25 PM
|
0
|
0
|
2046
|
|
POST
|
Here's an example: http://forums.arcgis.com/threads/1631-Beta-10-GraphicsLayer-Symbol-by-GeometryType You don't need to call getSymbol() directly. It's called by the GraphicsLayer just like the symbolFunction used to be called. You just need to set the GraphicsLayer's renderer property.
... View more
10-05-2010
09:11 AM
|
0
|
0
|
2046
|
|
POST
|
I don't follow why there's now an extra step? You can still pass an Extent to the contains() method since Extent is a type of Geometry.
... View more
10-04-2010
12:48 PM
|
0
|
0
|
1110
|
|
POST
|
Yes, it does seem to be a bug that happens only when the map's height is greater than its width. Here's another test case showing the issue (it works fine when the width and height are reversed or equal): <?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">
<s:layout>
<s:VerticalLayout horizontalAlign="center"
paddingBottom="10"
paddingTop="10"/>
</s:layout>
<fx:Script>
<![CDATA[
protected function button1_clickHandler(event:MouseEvent):void
{
map.extent = testExt;
}
]]>
</fx:Script>
<s:Button click="button1_clickHandler(event)" label="Set Extent"/>
<esri:Map id="map"
width="500" height="600">
<esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
<esri:GraphicsLayer>
<esri:Graphic>
<esri:WebMercatorExtent id="testExt"
minlon="5" minlat="-80" maxlon="10" maxlat="80"/>
<esri:symbol>
<esri:SimpleFillSymbol color="red"/>
</esri:symbol>
</esri:Graphic>
</esri:GraphicsLayer>
</esri:Map>
</s:Application>
... View more
10-04-2010
11:59 AM
|
0
|
0
|
1190
|
|
POST
|
It was replaced with the contains() method that accepts any Geometry type. http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/geometry/Extent.html#contains()
... View more
10-04-2010
11:52 AM
|
0
|
0
|
1110
|
|
POST
|
One option could be to create a new custom Renderer class by extending Renderer and overriding the getSymbol() function. Reference: http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/renderers/Renderer.html
... View more
10-04-2010
11:19 AM
|
0
|
0
|
2046
|
|
POST
|
I'm not able to reproduce this using the code below. What version of the API are you trying? Is it not zooming in for you? Are you using a dynamic or tiled base layer? <?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:Script>
<![CDATA[
import com.esri.ags.events.MapMouseEvent;
import com.esri.ags.geometry.Extent;
import com.esri.ags.utils.GraphicUtil;
import mx.collections.ArrayCollection;
protected function map_mapClickHandler(event:MapMouseEvent):void
{
var graphicProvider:ArrayCollection = gLayer.graphicProvider as ArrayCollection;
var graphicsExtent:Extent = GraphicUtil.getGraphicsExtent(graphicProvider.toArray());
trace(graphicsExtent, graphicsExtent.width, graphicsExtent.height);
map.extent = graphicsExtent;
trace(map.extent, map.extent.width, map.extent.height)
}
]]>
</fx:Script>
<esri:Map id="map" mapClick="map_mapClickHandler(event)">
<esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
<esri:GraphicsLayer id="gLayer">
<esri:Graphic>
<esri:WebMercatorMapPoint lon="10" lat="10"/>
</esri:Graphic>
<esri:Graphic>
<esri:WebMercatorMapPoint lon="10" lat="50"/>
</esri:Graphic>
</esri:GraphicsLayer>
</esri:Map>
</s:Application>
... View more
10-01-2010
03:29 PM
|
0
|
0
|
1190
|
|
POST
|
Yes, except ArcGIS Server 10 is not required to get LayerDetails (unless you're trying to get them all at once in the AllDetails class).
... View more
10-01-2010
10:29 AM
|
0
|
0
|
1741
|
|
POST
|
Yes, this does require server 10 since it uses a new returnIdsOnly parameter. Reference: http://sampleserver3.arcgisonline.com/ArcGIS/SDK/REST/query.html
... View more
10-01-2010
08:43 AM
|
0
|
0
|
1382
|
|
POST
|
We're investigating the Design mode issue. In the meantime, your "Additional compiler arguments" should be: -locale=en_US -source-path=locale/{locale} -keep-all-type-selectors=true If it's only: -locale=en_US it doesn't know where to find the "ViewerStrings" resource bundle.
... View more
09-30-2010
03:27 PM
|
0
|
0
|
3722
|
|
POST
|
You need to add <httpproxy>proxy.ashx</httpproxy> to the root (like the title) of your config.xml to tell the Viewer what the url to the proxy is. You're also missing the 'h' in http in the url on your serverUrl in the proxy.config. You don't have to give it the full url. You can just use the start like this "http://services.azgs.az.gov/".
... View more
09-30-2010
02:17 PM
|
0
|
0
|
2639
|
|
POST
|
I understand what you say about looping through dynamic object properties, but when I look at a feature within an IdentiftResult the attributes are all in a seemingly random order before I do any for..in statements? What are you using to "look at a feature"? So in short (for my boss), IdentifyResult.Feature.Attributes are always going to be in a random order until we move to ArcGIS Server 10? This is not changed by AGS 10 since the attributes are still in an object. You can use LayerDetails to get the fields of the layer and loop through them in that order like the code above in the QueryWidget. http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/supportClasses/LayerDetails.html
... View more
09-30-2010
11:25 AM
|
0
|
0
|
1741
|
|
POST
|
No, you'd still need to either hard-code or use LayerDetails.fields to pull out the attributes in a particular order. The Search and Query Widgets are taking advantage of the fields returned as part of the FeatureSet from ArcGIS Server 10. Here's the code from QueryWidget: if (featureSet.fields) // requires ArcGIS Server 10.0+
{
for each (var field:Field in featureSet.fields)
{
if (field.name in graphic.attributes)
{
displayFields(field.name, getFieldXML(field.name), field);
}
}
}
else
{
for (var fieldName:String in graphic.attributes)
{
displayFields(fieldName, getFieldXML(fieldName), null);
}
} The underlying problem is that when you use for..in statements to pull out all the values from an Object, ActionScript doesn't guarantee any order. Reference: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/statements.html#for..in
... View more
09-29-2010
09:31 AM
|
0
|
0
|
1741
|
|
POST
|
See the page in the TOC called "Using proxy" under the Concepts at: http://help.arcgis.com/en/webapps/flexviewer/help/index.html
... View more
09-28-2010
02:33 PM
|
0
|
0
|
2639
|
|
POST
|
Can you post the code for how you're configuring the Locator vs. the dynamic services? You can also use a tool like HttpFox to see what requests are being made and what the responses are.
... View more
09-28-2010
02:30 PM
|
0
|
0
|
509
|
| 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
|