|
POST
|
I have a CollapseContainer skinnable container that I use that can be tweaked via the skin. https://gist.github.com/773635 Here is the Skin I use to collapse the container on the left of the of the page to a small bar. https://gist.github.com/773640 Not at work at the moment, so I can't get a screenshot of how it works, but you pretty much let the skin do the work to resize and move the parts.
... View more
01-10-2011
12:57 PM
|
0
|
0
|
1325
|
|
POST
|
We recently had a need to build a Batch Geocoder tool that we could use to verify some addresses against our internal GeocodeServer service. This started as an AIR application I built in my spare time, but decided to modify it to work with Flexviewer. It's a tool we might use in our internal Flexviewer app, and I thought others might find a use for it. It will let you upload a dbf file of addresses, geocode them, give you the closest address found and the score, then export those results to an Excel file. http://www.arcgis.com/home/item.html?id=c663df2846d04a6b9add92b66c637728
... View more
01-07-2011
11:10 AM
|
0
|
12
|
1637
|
|
POST
|
Have you ever had a user ask if they could just label an item on the map by some arbitrary attribute without manually typing anything in? No? Damn, well I have, sucks for me. Anyway, I had this tool already built as a standalone component, but decided to throw it into a widget so we could use it in a generic Flexviewer app that we have. http://www.arcgis.com/home/item.html?id=c09a6d1fd0514b36a761a29b11b60047 It basically works like this. Select a service from the Map. Select a layer from the selected Service. Select a field from that layer. Click add label and click on a feature in the layer. To get back to a different Service or Layer, click on the corresponding buttons above the list. The tool uses the IdentifyTask so that I could use the tolerance capabilities for point features (big deal for me), so it only works with Services that support Identify. So no FeatureServer services, sorry. If I get around to it, I might be able to add QueryTask functionality for those special use cases, if it seems like a big deal for folks.
... View more
12-28-2010
12:40 PM
|
0
|
0
|
797
|
|
POST
|
You can try wrapping it in a CDATA block visible="<![CDATA[{myMap.scale < 4500}]]>"
... View more
12-27-2010
06:15 AM
|
0
|
0
|
345
|
|
POST
|
The API docs can give you some insight on when you would use FeatureLayer http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/FeatureLayer.html
The feature layer can be used to display features from one single layer of either a Feature Service or a Map Service. The layer can be either a (spatial) layer or a (non-spatial) table. The features in a FeatureLayer can be edited if it is based on a Feature Service.
If the layer supports attachment, the layerDetails (or tableDetails) "hasAttachment" property will be true. If the feature layer is editable and has attachment, you can also add and delete attachments.
So if you want to do editing, use temporal features, FeatureLayer is your choice. FeatureLayer is essentially a GraphicsLayer with some sugar, i.e., built in QueryTask. You wouldn't use DynamicMapServiceLayer directly, as it is a base class. http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/DynamicMapServiceLayer.html But what it does allow you to do is something like if (layer is DynamicMapServiceLayer)
{
// do something to apply to all subclasses
}
//as opposed to writing
if (layer is ArcGISDynamicMapServiceLayer || layer is ArcGISImageServiceLayer || layer is ArcIMSMapServiceLayer || layer is GPResultImageLayer || layer is WMSLayer)
{
// do the same thing
} You can view the Layers in the layers package here, each with some some descriptions http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/package-detail.html
... View more
12-23-2010
10:54 AM
|
0
|
0
|
543
|
|
POST
|
I don't have a widget, but I did make a Magnify component for my projects that could pretty easily be turned into a widget. This is the Skinnable Component https://gist.github.com/753059 This is the TitleWindow with some methods to pass the MagnifyWindow when you move it around the screen. https://gist.github.com/753061 It basically accepts your main map as the source map to know the current location of the window on the screen. You add a "Detailed" layer, in my case I use some high resolution imagery we have in-house. You can then add "Operational" layers to view on top of your "Detailed" layer. All layers have to be Dynamic so that you can zoom in as far as you want. I'll clean it up and add it to my FlexMapTools library at some point, but pretty busy this time of year. Hope that helps.
... View more
12-23-2010
04:48 AM
|
0
|
0
|
955
|
|
POST
|
You can add an eventListener to each graphic in the arraycollection,then when it gets clicked, save that item so that when you click on delete you can find it in the ArrayCollection. So, something like this. var graphic:Graphic = event.currentTarget as Graphic;
var i:int = arrayCollection.getItemIndex(graphic);
arrayCollection.removeItemAt(i);
... View more
12-14-2010
01:20 PM
|
0
|
0
|
459
|
|
POST
|
I have only done some CF work in my home dev environment, but using CF remote calls in with the current Flex API/Flexviewer should be no different than you did with the 1.x version. Add your CF destinations to your services-config.xml and Flex will handle the rest. In Flashbuilder, if you like the code generation, there is a Connect to ColdFusion option to connect to remote services.
... View more
12-10-2010
07:01 AM
|
0
|
0
|
279
|
|
POST
|
I had the odd issues when I started working with FeatureLayer. Try listening on the rollOver/rollOut events instead, see if that helps. http://forums.arcgis.com/threads/8747-Odd-behavior-of-FeatureLayer-and-MapPoint-graphics
... View more
12-07-2010
12:56 PM
|
0
|
0
|
524
|
|
POST
|
Flex can't access local resources in that manner and although AIR can access some local resources, as far as I know com/serial ports is not one of them. You may be able to write a small app in say Java that can write to the SQLlite db that AIR can read instead of having to send a query off to a server. If this is a web app, you're method should work.
... View more
11-24-2010
01:29 PM
|
0
|
0
|
476
|
|
POST
|
My java experience is pretty limited to just database access and queries. To access SQL Server, you'll need the sqljdbc4.jar from Microsoft. One thing I am doing in that query is turning my results into a custom object I call FlowControl, which is a pretty simple Java object, but what it allows me to do is quickly serialize those objects in Flex by adding this metadata tag to a class [RemoteClass(alias="SewerDb.dto.FlowControl")] public class FlowControl... So your Flex object matches your Java object. There are lots of materials on Adobe's website and elsewhere on using BlazeDS with Flex. http://www.adobe.com/devnet/livecycle/articles/blazeds_spring.html One book that I really like that just recently went into print is Flex On Java, which covers the subject really well. If however, you are like me and prefer working in a .NET environment, you can use WebOrb for .NET, which is a great solution for tasks like this. A great benefit of WebOrb is the WebOrb console which will let you test your functions as well provide you the Actionscript code you would need to use the functions. It has fantastic code generation tools that you can use to learn from. Using RemoteObjects requires slightly more setup initially to access backend data, but it absolutely worth it in the end. We have one function to perform flow tracing that can return a few thousand records that is done via a WebOrb AMF endpoint, and as a regular WSDL web service it took up to 2 minutes to return results and we can now show the query results in less than 10 seconds.
... View more
11-22-2010
05:49 AM
|
0
|
0
|
614
|
|
POST
|
Has anyone been able to find a work around for this. The main complaint I am getting from users is the inability to zoom in further than they can now, especially because this functionality worked in the 1.3 API. Do I need to completely remove my tiled services from the project to do this? It used to be that I could disable the map.lods, turn off tiled services and zoom in on the map as far as I wanted. Now I can't do that. Any help would be appreciated here, or how can we file this as a bug?
... View more
11-22-2010
05:25 AM
|
0
|
0
|
889
|
|
POST
|
I have a utility function I use based on a lot what Robert Scheitlin did for his Legend tool that handles PictureMarkerSymbols as well. https://github.com/odoe/FlexMapTools/blob/master/src/net/odoe/FlexMapTools/factories/SwatchFactory.as
... View more
11-22-2010
05:21 AM
|
0
|
0
|
320
|
|
POST
|
Does the data in the tables you are querying via BlazeDS match fields in your map service? For example, what I do is use BlazeDS/WebOrb to query various tables of land use and property information, get back a list of say parcel numbers, then I perform a QueryTask on the map service of parcels using those parcel numbers. For various reasons, this data sits outside an SDE, but I can use the remote service to tie everthing together. I've gotten very comfortable working with my data in this manner and because I can customize the queries to my hearts content, I actually prefer it to Relationship queries provided by the ESRI Flex API. For example, I have a java query in BlazeDS to queries some Flow data for our sewer system. public static ArrayList<FlowControl> getFlowControlList() {
ArrayList<FlowControl> flows = new ArrayList<FlowControl>();
ResultSet resultSet;
try {
connection = ConnectionHelper.sdeConnection();
Statement stmt = connection.createStatement();
String sql = "SELECT CSDAssetID, CSDFeatureID, '' AS PipeCSDAssetID, '' AS PipeCSDFeatureID, UpstreamPipeCSDAssetID, UpstreamPipeCSDFeatureID, "
+ "DownstreamPipeCSDAssetID, DownstreamPipeCSDFeatureID, FlowControlInputDate, FlowAllowed, FlowControlPosition, Subtype "
+ "FROM sde.SSCOMPLEXFLOWCONTROLHISTORY AS cf "
+ "WHERE (FlowControlInputDate = "
+ "(SELECT MAX(FlowControlInputDate) AS Expr1 "
+ "FROM sde.SSCOMPLEXFLOWCONTROLHISTORY AS cf2 "
+ "WHERE (CSDAssetID = cf.CSDAssetID) AND (CSDFeatureID = cf.CSDFeatureID))) "
+ "UNION "
+ "SELECT CSDAssetID, CSDFeatureID, PipeCSDAssetID, PipeCSDFeatureID, '' AS UpstreamPipeCSDAssetID, '' AS UpstreamPipeCSDFeatureID, "
+ "'' AS DownstreamPipeCSDAssetID, '' AS DownstreamPipeCSDFeatureID, FlowControlInputDate, FlowAllowed, FlowControlPosition, Subtype "
+ "FROM sde.SSFLOWCONTROLHISTORY AS f "
+ "WHERE (FlowControlInputDate = "
+ "(SELECT MAX(FlowControlInputDate) AS Expr1 "
+ "FROM sde.SSFLOWCONTROLHISTORY AS f2 "
+ "WHERE (CSDAssetID = f.CSDAssetID) AND (CSDFeatureID = f.CSDFeatureID))) "
+ "ORDER BY CSDAssetID";
resultSet = stmt.executeQuery(sql);
while (resultSet.next()) {
FlowControl flow = new FlowControl();
flow.setCsdAssetId(resultSet.getString(CSD_ASSET_ID));
flow.setCsdFeatureId(resultSet.getString("CSDFeatureID"));
flow.setDownstreamPipeCsdAssetId(resultSet
.getString("DownstreamPipeCSDAssetID"));
flow.setDownstreamPipeCsdFeatureId(resultSet
.getString("DownstreamPipeCSDFeatureID"));
flow.setFlowAllowed(resultSet.getBoolean("FlowAllowed"));
flow.setFlowControlInputDate(resultSet
.getDate("FlowControlInputDate"));
flow.setFlowControlPosition(resultSet
.getString("FlowControlPosition"));
flow.setPipeCsdAssetId(resultSet.getString("PipeCSDAssetID"));
flow.setSubType(resultSet.getString("Subtype"));
flow.setUpstreamPipeCsdAssetId(resultSet
.getString("UpstreamPipeCSDAssetID"));
flow.setUpstreamPipeCsdFeatureId(resultSet
.getString("UpstreamPipeCSDFeatureID"));
flows.add(flow);
System.out.println("FlowList = " + flow.getCsdAssetId() + " : "
+ flow.getCsdFeatureId());
} // end while statement
} catch (SQLException ex) {
System.out.println(ex.getMessage());
} // end try-catch block
finally {
closeConnection();
}
return flows;
} Then in my Flex project, I can use the ArrayList as a DataProvider for a table or iterate the list to build a query that will use an existing map service in my application.
... View more
11-22-2010
05:12 AM
|
0
|
0
|
614
|
|
POST
|
Sorry, I meant to remove those comments. You just need to use the event.mapPoint as the geometry for your IdentifyParameters you send to your IdentifyTask. http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/tasks/supportClasses/IdentifyParameters.html idParams.geometry = event.mapPoint; Hope that helps.
... View more
11-12-2010
09:13 AM
|
0
|
0
|
817
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 3 weeks ago | |
| 1 | 11-13-2025 03:13 PM | |
| 2 | 11-06-2025 11:10 AM | |
| 3 | 11-05-2025 02:54 PM | |
| 1 | 11-04-2025 02:38 PM |
| Online Status |
Offline
|
| Date Last Visited |
Wednesday
|