|
POST
|
You want to add a field to your attributes to hold the selection, something like isSelected:Boolean arrayCollection1.addItem({filename:filename, isSelected: true}); Then in your checkbox itemrenderer <?xml version="1.0" encoding="utf-8"?>
<s:MXDataGridItemRenderer
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark">
<s:CheckBox id="cb" horizontalCenter="0" selected={data.isSelected}/>
</s:MXDataGridItemRenderer> Then use that when you want to figure out what items to export.
... View more
03-03-2011
03:02 AM
|
0
|
0
|
709
|
|
POST
|
This widget has been updated to that you can now edit your results and attempt to rematch the addresses to get a better score.
... View more
02-22-2011
04:45 AM
|
0
|
0
|
1771
|
|
POST
|
Not sure if this will help, but I had found this somewhere to check out licenses and it has worked for me so far. This will initialize the lowest available license
package org.lacsd.services.helpers;
import java.io.IOException;
import java.net.UnknownHostException;
import com.esri.arcgis.system.AoInitialize;
import com.esri.arcgis.system.EngineInitializer;
import com.esri.arcgis.system.esriLicenseProductCode;
import com.esri.arcgis.system.esriLicenseStatus;
public class LicenseHelper {
/**
* Initializes the lowest available ArcGIS License
*/
public static AoInitialize initializeArcGISLicenses()
{
EngineInitializer.initializeEngine();
AoInitialize aoInit = null;
try {
aoInit = new AoInitialize();
} catch (UnknownHostException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try
{
System.out.println("license type: " + esriLicenseStatus.esriLicenseAvailable);
if (aoInit.isProductCodeAvailable(esriLicenseProductCode.esriLicenseProductCodeEngine) == esriLicenseStatus.esriLicenseAvailable)
{
aoInit.initialize(esriLicenseProductCode.esriLicenseProductCodeEngine);
}
else if (aoInit.isProductCodeAvailable(esriLicenseProductCode.esriLicenseProductCodeArcServer) == esriLicenseStatus.esriLicenseAvailable)
{
aoInit.initialize(esriLicenseProductCode.esriLicenseProductCodeArcServer);
}
else if (aoInit.isProductCodeAvailable(esriLicenseProductCode.esriLicenseProductCodeArcInfo) == esriLicenseStatus.esriLicenseAvailable)
{
aoInit.initialize(esriLicenseProductCode.esriLicenseProductCodeArcInfo);
}
else
{
System.err.println("Could not initialize an Engine or ArcView license. Exiting application.");
System.exit(-1);
}
// do any extra checkouts here, could probably expand to make sure extension available
// aoInit.checkOutExtension(com.esri.arcgis.system.esriLicenseExtensionCode.esriLicenseExtensionCodeNetwork);
}
catch (Exception e)
{
e.printStackTrace();
}
return aoInit;
}
}
... View more
02-17-2011
08:37 AM
|
0
|
0
|
2154
|
|
POST
|
This might help you out. I just saw that someone put this up the other day http://www.arcgis.com/home/item.html?id=bdd12eac11e14b5ebe11d011b0207120
... View more
02-16-2011
10:28 AM
|
0
|
0
|
602
|
|
POST
|
myWS.getWebServiceData(selectedMortarSize, numStepMaxCharge.value, piIllum, piUSAmmo);
// this happens before data is returned
mortarChargeData = myWS.MortarChargeData;
The problem you are having is you are trying to get the results of your service call from your myWS object before myWS has had a chance to get the process the results. You could have your myWS object dispatch an Event.COMPLETE when it's done, so it would look like
// have your myWS extend EventDispatcher
protected function myResultHandler(event:ResultEvent):void
{
myMortarChargeData = new ArrayCollection();
myMortarChargeData = event.result.Tables.mortarChargeData.Rows;
dispatchEvent(new Event(Event.COMPLETE));
}
Then listen for it
// just an example, you should probably use a named function
myWS.addEventListener(Event.Complete, function(e:Event):void { mortarChargeData = myWS.MortarChargeData; });
myWS.getWebServiceData(selectedMortarSize, numStepMaxCharge.value, piIllum, piUSAmmo);
... View more
02-16-2011
10:24 AM
|
0
|
0
|
558
|
|
POST
|
Try adding a "/" in front of the path in your app like "/assets/images/cross_cursor.png" The mxmlc compiler can be picky about that when using embeds in your app.
... View more
02-11-2011
06:40 AM
|
0
|
0
|
967
|
|
POST
|
I'm having a similar problem with map.setExtent(). It will work the first time that I try it, but will refuse to set the extent after that. Here is how I load my features into my map.
function onResults(results) {
var features = results.features;
var len = features.length;
annexDict = {};
map.graphics.clear();
var sel = dojo.byId("annexSelect");
while (sel.hasChildNodes()) {
sel.removeChild(sel.lastChild);
}
var j = 0;
for (j = 0; j < features.length; j++) {
var feature = features ;
var item = feature.attributes;
var c = dojo.doc.createElement("option");
c.innerHTML = "TEST: " + item.ANNEXATION;
c.value = item.ANNEXATION;
sel.appendChild(c);
annexDict[c.value] = {
annex: item.ANNEXATION,
graphic: feature
}
map.graphics.add(feature);
}
} My results get added a Multiselect list and a dictionary object. Then when an item in the list is clicked, I handle it like this.
function onAnnexInListClicked(e) {
console.log("option was clicked");
if (e.target) {
try {
var targ = e.target;
console.log(targ.value);
var item = annexDict[targ.value];
console.log("from dictionary: Annexation = " + item.annex);
var g = item.graphic;
var geom = g.geometry;
var ext = geom.getExtent();
// tried to explicitly create a new extent, but same result
var xmin = ext.xmin;
var ymin = ext.ymin;
var xmax = ext.xmax;
var ymax = ext.ymax;
var sr = new esri.SpatialReference({wkid: 102100});
var gExt = new esri.geometry.Extent(xmin, ymin, xmax, ymax, sr);
map.setExtent(gExt);
// map.setExtent(ext); // this had the same result
console.log("map extent changed");
} catch(err) {
console.log("error in setting map extent to graphic extent");
console.log(err);
}
}
}
The first time an item is clicked, the map will zoom to the proper location. After that, all subsequent requests to change the map extent seem to have no effect. My console traces show that I am clicking on a new item and no errors are being thrown, so I'm a bit stumped at this point. Any help would be appreciated, thanks.
... View more
02-10-2011
10:22 AM
|
0
|
0
|
1500
|
|
POST
|
I'm diving head first into learning some Java using ArcObjects. We have a Flow trace tool using a geometric network that we have written in C# and it works perfectly on the desktop and on server. I have had some pretty good success in porting most of the code over to Java, but I have hit a snag in trying to cast a FeatureDataset to a NetworkCollection. This is the working portion in C#. // Obtain a reference to the geometric network in the feature workspace
IFeatureDataset featureDataset = featureWorkspace.OpenFeatureDataset("sde.Sewerage_Network_Classes");
INetworkCollection networkCollection = (INetworkCollection)featureDataset;
IGeometricNetwork geometricNetwork = networkCollection.get_GeometricNetworkByName("sde.Sewerage_Network_Classes_Net");
INetwork network = geometricNetwork.Network; Looks pretty much the exact same in Java // Obtain a reference to the geometric network in the feature workspace
INetwork network = null;
INetSolver netSolver = null;
IGeometricNetwork geometricNetwork = null;
INetworkCollection networkCollection = null;
try
{
IFeatureDataset featureDataset = featureWorkspace.openFeatureDataset("sde.Sewerage_Network_Classes");
networkCollection = (INetworkCollection) featureDataset; // <-- this is where the error happens
geometricNetwork = networkCollection.getGeometricNetworkByName("sde.Sewerage_Network_Classes_Net");
}
catch(Exception e)
{
System.out.println("This error sucks!");
System.out.println(e.getMessage());
} I'm running my jUnit tests and catching the following error at the line indicated above. com.esri.arcgis.geodatabase.IFeatureDatasetProxy cannot be cast to com.esri.arcgis.geodatabase.INetworkCollection I'm using the same connection properties to connect to the SDE, using the default instance. I'm pretty much stumped at this point. Is there a nuance that I might be missing? Thanks in advance.
... View more
02-10-2011
06:07 AM
|
0
|
2
|
1305
|
|
POST
|
yeah, you'll want to exclude your .* files and folders from the svn because they will usually be machine specific and path dependant. So they won't play well across multiple machines. I have never used the fb.exportReleaseBuild, but this is probably going to be a FlashBuilder dependant tool. I have not checked to see if it's in the SDK folder or the FlashBuilder App folder. I have been using your very scenario for a couple of years now, svn->automated build. To get started, I would recommend the following walkthroughs. http://www.unitedmindset.com/jonbcampos/2010/01/07/using-ant-to-build-an-application/ http://www.unitedmindset.com/jonbcampos/2010/01/14/building-a-library-with-ant/ http://www.unitedmindset.com/jonbcampos/2010/01/19/building-the-html-wrapper-with-ant/ http://www.unitedmindset.com/jonbcampos/2010/01/20/building-a-custom-html-wrapper-with-ant/ http://www.unitedmindset.com/jonbcampos/2010/01/21/including-assets-files-with-ant/ http://www.unitedmindset.com/jonbcampos/2010/01/26/building-a-library-and-application-with-ant/ http://www.unitedmindset.com/jonbcampos/2010/01/28/building-asdocs-with-ant/ http://www.unitedmindset.com/jonbcampos/2010/02/09/the-master-flex-ant-file/ There are a couple of others that have to do with building FlexUnit tests with ANT, but you could find them in there. Now, I have not tried creating build scripts for Flexviewer, but ideally, I would invest the time into creating a build script per widget. This way, a co-worker can work on a widget, I could work on a widget and we could both run our widget specific build scripts without having to rebuild the whole project. So in a per widget ANT build scenario in your svn, you could have a master ANT build that would run each individual build file, while at the same time it should allow you to build the widgets independantly. Here is a sample of using ANT to compile modules. http://jvalentino.blogspot.com/2010/03/flex-ant-build-optimized-modules_24.html http://modular.theflexsite.net/blog/ant/build.xml
... View more
02-10-2011
05:07 AM
|
0
|
0
|
967
|
|
POST
|
I know it still works with the current Flex API as myself and others still use it, but I don't save remotely, so I'm not sure if that might be the issue. I let users save locally, so mine just looks like this. var bytes:ByteArray = _pdf.save(Method.LOCAL); fileReference.save(bytes, "map.pdf");
... View more
02-04-2011
08:26 AM
|
0
|
0
|
2095
|
|
POST
|
I maintain a library using the ESRI Flex API and I know that error all too well. Granted, this error will ONLY occur in Flex/FlashBuilder, I can successfully link my library files in IntelliJ and FDT withouth issue. Go figure. Anyway, in the Properties for your main project, add your library file (Add Project), make sure Link Type is RSL (runtime shared library). FlashBuilder will compile and link to the library swf. Now, here is the kicker. If you make any changes to your library file at all that force it to rebuild, you will need to remove the library project from your Main project and re-add it following the steps above. You'll need to do this every single time you update your library project. It's a horrible workaround, but I do it on a daily basis. I am really not a fan of Flashbuilder at all.
... View more
02-03-2011
11:56 AM
|
0
|
0
|
665
|
|
POST
|
Not too long ago someone had inquired about a Real Estate widget using Zillow or some other service on this forum. So, I had been wanting to try out some new API's and built a Zillow Widget for Flexviewer 2.x. http://www.arcgis.com/home/item.html?id=43a861b27c3a4463b23493d042974138 You will need to get your own Zillow API key from Zillow, which you can do for free. http://www.zillow.com/howto/api/APIOverview.htm Their API calls are pretty well documented and it's basically a lot of XML parsing. This widget was also built using Robotlegs once I realized that it was really going to be a more invloved module than I initially anticipated. If you wish to compile from source, you will need the Robotlegs .swc file which you can get from the official site. http://www.robotlegs.org/ I have tested some more extensive API calls to Zillow and I am pleasantly surprised that their servies are quick. You are limited to 1000 API calls per day, so if my sample application breaks, that is probably why. The latest source can be found on github https://github.com/odoe/Zillow-Widget I will update the zip file on the Resource center when new functionalities are complete. The github repo will probably have some incomplete features as I commit often while working. Any feedback is welcome, thank you. Update: (02/03/2011) - added search options for Regional Postings to include Property Types and Rentals.
... View more
02-02-2011
01:12 PM
|
0
|
11
|
3835
|
|
POST
|
If it's just the one name you're worried about you could do this var qName:String = qTextFname.text.toLowerCase(); var len:int = qName.length; var ucase:String = qName.charAt(0).toUpperCase(); var temp:String = qName.substr(1, len); var newName:String = ucase + temp; AS3 doesn't have a simple capitalize function. OOh, found a regex method to do it for multiple words http://stackoverflow.com/questions/860394/flex-capitalize-words-in-string
... View more
01-27-2011
08:07 AM
|
0
|
0
|
761
|
|
POST
|
I don't even remember what was in the core swc, but technically you could load the swf standalone in your app, but not sure what kind of interaction you were hoping to get with it from the rest of your application. I think you'd just need to load viewer into it's own domain to avoid conflicts. Not an elegant solution, but something you could probably play with.
... View more
01-27-2011
07:39 AM
|
0
|
0
|
1075
|
|
POST
|
Todd, I can't answer with certainty in trying to compile the Flex API apps with CS3, but don't think it would work, or at least not easily. FlashDevelop is a free Flash/Flex IDE I have heard lots of good things about. http://www.flashdevelop.org/wikidocs/index.php?title=Main_Page
... View more
01-20-2011
01:36 PM
|
0
|
0
|
855
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 2 | 3 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 |
a week ago
|