|
POST
|
If that doesn't solve your issue, are you doing compiling via ANT?
... View more
08-26-2010
12:27 PM
|
0
|
0
|
1204
|
|
POST
|
One kind of hacky way to do would probably require that you extend the Map object. Map has a UIComponent that appears to hold the layers. You can rotate this object without rotating the nav tool/logo/scalebar. But, you'd need to reset the x/y and width/height of this UIComponent to avoid having it appear as though your map has been "trimmed". That's the part that would probably require you overriding the updateDisplayList method of Map to make those changes stick, at least for width and height. You can test this out like this.
<?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:esri="http://www.esri.com/2008/ags"
pageTitle="A tiled map service">
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function map_creationCompleteHandler(event:FlexEvent):void
{
var i:int = 0;
var x:int = map.numChildren;
for (i; i < x; i++) {
if ( getQualifiedClassName(map.getChildAt(i)) == "mx.core::UIComponent") {
// if you extent the Map, you could make a mapRotate field to hold this value
map.getChildAt(i).rotation = -54;
// positioning could be tricky depending on amout rotated
map.getChildAt(i).x -= 50;
map.getChildAt(i).y = map.height/2;
map.getChildAt(i).width = map.getChildAt(i).width * 2;
map.getChildAt(i).height = map.getChildAt(i).height * 10;
}
}
}
]]>
</fx:Script>
<s:Group width="800" height="500">
<esri:Map id="map" creationComplete="map_creationCompleteHandler(event)" >
<esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
</esri:Map>
</s:Group>
</s:Application>
I haven't gone any further than this to see if it would work. Maybe someone else has a simpler solution. Now that I think about, you could hide the Nav/Scalebar/Logo, just rotate the whole map and then place a separate Nav/Scalebar outside the map. With the 2.0 API, we now have a ScaleBar object that you just set the map for and you're good to go. That's probably an easier solution than trying to fuss with extending the Map. This method is probably easier.
<?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:esri="http://www.esri.com/2008/ags"
pageTitle="A tiled map service"
xmlns:mx="library://ns.adobe.com/flex/mx">
<s:layout>
<s:VerticalLayout />
</s:layout>
<s:BorderContainer borderColor="0x000000">
<s:Group id="grpMap"
width="400"
height="400">
<esri:Map id="map"
logoVisible="false"
scaleBarVisible="false"
x="-389"
y="337"
rotation="-54" width="1000" height="1000">
<esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
</esri:Map>
</s:Group>
<s:Scroller horizontalScrollPolicy="off"
verticalScrollPolicy="off"
viewport="{grpMap}" />
</s:BorderContainer>
<s:Group>
<s:layout>
<s:HorizontalLayout />
</s:layout>
<esri:Navigation map="{map}" />
<esri:ScaleBar map="{map}"
verticalCenter="0" />
</s:Group>
</s:Application>
Still, to implement this, you'd probably want to do some math to size and position the map in the container just right. I'm not sure how simply turn Nav off in the Map either.
... View more
08-25-2010
01:06 PM
|
0
|
0
|
972
|
|
POST
|
That is odd. Tried adding a rotation to this example http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=TiledMap and it just doesn't like it. Can't even zoom to the layer properly.
... View more
08-25-2010
10:38 AM
|
0
|
0
|
972
|
|
POST
|
There are a couple of options. In the Flex API, there is a DrawingInfo field for LayerDetails. You can grab the renderer from there. Mr. Scheitlin has a great example of this in his DynamicLegendWidget. If you go through his widget, you can see how he parses the LayerDetails to get this information.
... View more
08-23-2010
12:51 PM
|
0
|
0
|
674
|
|
POST
|
I tried your code using Flex 3.6 nightly build and it worked fine. So the issue appears to be a 3.5 bug.
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
protected var ac:ArrayCollection = new ArrayCollection([{name:"Bob",
children:["bobby", "sally", "billy"]},
{name:"Sarah",
children:["angie","kelly"]},
{name:"Sam",
children:["sammy","roger","troy", "rich"]}]);
]]>
</mx:Script>
<mx:ComboBox id="areaCB"
labelField="name"
dataProvider="{ac}" />
<mx:ComboBox id="teamCB"
dataProvider="{areaCB.selectedItem.children}"
labelField="Team" />
</mx:HBox>
You're best bet is to either downgrade to 3.4 or move to 3.6.
... View more
08-05-2010
10:21 AM
|
0
|
0
|
1835
|
|
POST
|
Hi Casey, There is a similar case noted on the Adobe forums with syncing ComboBoxes using SDK 3.5 I can repeat the bug in this thread in the 3.5 SDK that ships with FlashBuilder 4. http://forums.adobe.com/message/2642802 It may be related. Can you provide a sample of the ArrayCollection? I think I still have some nightly builds I can test against.
... View more
08-05-2010
09:06 AM
|
0
|
0
|
1835
|
|
POST
|
You can try calling areaChange on the close event, but I think the issue might be that since you have combobox 2 bound to an object in the selected item of combobox 1, you don't need to make the function call at all. Try removing the areaChange call where you set the dataProvider to null. You shouldn't need it.
... View more
08-05-2010
07:29 AM
|
0
|
0
|
1835
|
|
POST
|
I don't use the FlexViewer Bjorn, but I tried moving away from specific nav tools, like pan/zoom previous/zoom next/zoom out, but one of the first things users ask is, "hey, where is the zoom previous or pan button". I never should have put it in to begin with, but the users want what they want. Personally, I think a single zoom in would be fine, but apparently I'm too minimalist.
... View more
08-04-2010
08:55 AM
|
0
|
0
|
1578
|
|
POST
|
If you're using the where clause, I don't think you need the text property. It's not your error though. <esri:Query id="query" where="STATE_NAME = '{qStateName.text}' and pop1990 < 1000000" returnGeometry="true" outSpatialReference="{map.spatialReference}"> FlashBuilder makes it look like you're passing regular text, but you're really binding it to the input.
... View more
07-29-2010
11:06 AM
|
0
|
0
|
550
|
|
POST
|
Use the WGS_1984_Web_Mercator which is wkid 102113 and is compatible with 102100. There was a thread a while discussing this, but I forget where it is now, but I don't think there is an explicit 102100 in ArcMap.
... View more
07-29-2010
09:23 AM
|
0
|
0
|
1120
|
|
POST
|
I use GraphicsLayer for miscellaneous selections, more like stuff where I just want to see a boundary, but don't care too much about the data behind it except maybe a name. I use the FeatureLayer for a couple of items where I can leverage the RelationshipQuery to easily pull in detailed data. I can't tell you how much easier this has made pulling detailed data from SDE tables for me. Previously, I would have had to use a WebService/RemoteObject to hit the SDE directly for table queries. Now that we have access to AMF in the QueryTask which is built into FeatureLayer, it's cut my service calls down drastically. When you do a selection using a FeatureLayer it returns an array of graphics, each with an attribute field. So when I do this
AsyncToken(fLayer.selectFeatures(query, "new", new AsyncResponder(response, onFault)));
I use this
[Bindable]
featuresColl:ArrayCollection; // bind this to a DataGrid dataprovider
private function response(features:Array, token:Object = null):void {
var f:Array = extractAttributesFromFeatures(features); // for loop in previous post
featuresColl = new ArrayCollection(f);
}
Graphics in the FeatureLayer are automatically show on your map and also stored in flayer.selectedFeatures So in comparison flayer.selectedFeatures is equivalent to featureSet.features but there doesn't seem to be an equivalent pointer to featureSet.attributes. I imagine this might be for performance reasons to keep Featurelayer efficient. You can review the FeatureLayerEvent which is the result when using queries with FeatureLayer to see some options http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/events/FeatureLayerEvent.html You can see the features array in there and you can also see that you get a FeatureSet when you use fLayer.queryFeatures, but a regular query doesn't show the graphics on the map automatically.
... View more
07-28-2010
07:13 AM
|
0
|
0
|
1762
|
|
POST
|
Is your ArcGIS Server version 10? Using a FeatureLayer, you can only get symbology back from AGS10. I had this issue when I started using FeatureLayer's before I upgraded my server.
... View more
07-27-2010
02:36 PM
|
0
|
0
|
1701
|
|
POST
|
You're a lifesaver Dasa. Chaning to ROLL_OUT/ROLL_OVER works great. Can't believe I didn't check event targets. Thanks again.
... View more
07-27-2010
12:06 PM
|
0
|
0
|
608
|
|
POST
|
I'm still not 100% clear on FeatureLayers purpose. It would seem looking at examples it's usefulness is really for editing and time-aware data. I'm sure they've covered it in more detail somewhere, but I may have missed it. If you review this sample, you'll see a quick note about FeatureCollection for FeatureLayer that states you should initialize FeatureCollection on your own. So it's not useful for data binding results of a query. http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=TemporalRenderer_FeatureCollection So far the method I have been using to extract attributes from a FeatureLayer is manually.
protected function extractAttributesFromFeatures(features:Array):Array {
var f:Array = [];
var g:Graphic;
for each (g in features) {
f.push(g.attributes);
}
return f;
}
Then you can set that result to a Datagrid dataprovider.
... View more
07-27-2010
11:41 AM
|
0
|
0
|
1762
|
|
POST
|
There are a couple of ways to approach it, but you are very close. Because you have the {theRpageLink} inside single quotes, it thinks that's the exact string you want to send. If you do new URLRequest(theRpageLink); that should work if theRpageLink is a well formed URL string. If you are using the infoWindowRender you should be able to pass the string directly. <esri:infoWindowRenderer>
<fx:Component>
<mx:VBox backgroundColor="0xffffff"
color="0x444444"
label="Parcel {data.PARCELID}">
<mx:Label text="URL: {data.Rpage}" click="theRpage_clickHandler(data.Rpage)"/>
</mx:VBox>
</fx:Component>
</esri:infoWindowRenderer>
private function theRpage_clickHandler(url:String):void
{
var theRpageURL:URLRequest = new URLRequest(url);
navigateToURL(theRpageURL, "_blank");
}
I haven't tested this example, but it should work.
... View more
07-26-2010
01:03 PM
|
0
|
0
|
1558
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a week ago | |
| 2 | 2 weeks ago | |
| 1 | 02-27-2026 06:31 AM | |
| 1 | 01-13-2026 02:15 PM | |
| 1 | 12-31-2025 09:05 AM |
| Online Status |
Offline
|
| Date Last Visited |
8 hours ago
|