|
POST
|
To use the Zillow widget, make sure you have downloaded the Robotlegs swc and added it to your Flexviewer libs folder. http://www.robotlegs.org/ That might be the issue. I just tried it out in FV 2.3 and it's working ok. If you get more errors, could you post the full console output of the error?
... View more
06-06-2011
08:00 AM
|
0
|
0
|
2243
|
|
POST
|
I wrote a utility class to process Zillow Results and turn them in to graphics. https://github.com/odoe/Zillow-Widget/blob/master/main/util/ZillowUtil.as If you look at the results, it returns a lat/long coordinate. var wgs:MapPoint = new MapPoint(attr.longitude, attr.latitude, new SpatialReference(4326));
var mp:MapPoint = WebMercatorUtil.geographicToWebMercator(wgs) as MapPoint; You'd need to send the results to a geometry service to reproject them. There's no easy way to reproject data clientside in Flex.
... View more
06-03-2011
02:27 PM
|
0
|
0
|
2243
|
|
POST
|
For reference, I placed a counter on my script and left it running Friday night. The result 2011-05-28 19:13:59.655000 | Total time to execute = 1 day, 4:24:41.896000 Took over a day. I am going to request that we try to update another machine with SP2 to verify. I was kind of hoping others were having similar problems before we try to contact our ESRI Support. I've run the Fc to Fc tool on network and local shapefiles and they work just fine. When I run the tool against an SDE feature, it is really slow. If I monitor the statusbar %, it gets to 99%, then starts over again at 0% and seems to get stuck in a loop. Because I can cancel and it will finish without errors and the data seems to be intact.
... View more
05-31-2011
05:57 AM
|
0
|
0
|
6736
|
|
POST
|
The GeoLocation widget linked above will fallback to IP location, but default is to use the HTML5 Geolocation. As far as GPS on a tablet, a Flex web app wouldn't be able to access a Tablets resources in that fashion. If it was deployed as an AIR application, like on an Android tablet, I do believe AIR for Android can access the device GPS, but I have not tried this.
... View more
05-27-2011
01:44 PM
|
0
|
0
|
1575
|
|
POST
|
I don't know if this matters at all, but I was running the FC to FC tool right now via ArcToolbox in ArcCatalog and 40 minutes (approx 42% done I think, tough to tell in that statusbar) in I decided to cancel it. Cancelling took about 5 minutes and I was monitoring the output file sizes before and after cancelling. sbn, shp, shx file sizes did not change at all. The dbf was 21.5mb before cancelling, and in 5 minutes from cancelling went to 91.5mb. Even though, I right-clicked -> cancel in the Result Window, I still got a success message and the Result Window says it was a success and not a cancel. Don't know if it just does that. I attached screenshots for reference, including my ArcToolbox env settings (which should be default, I have not touched these).
... View more
05-27-2011
01:26 PM
|
0
|
0
|
6736
|
|
POST
|
Wasn't sure if this should go here or Python forum, but I was able to replicate this issue in Model Builder, so I figured this was a good spot. So this week we decided to test SP2 on ArcMap 10. My PC is usually the guinea pig for service packs and we typically have no problems. Light testing this week had been fine, until I tried to run a Python script we use to export data from our SDE to some shapefiles for a legacy application. Typically, this script would take approximately 10 minutes to run (I keep logs of every run). Today, a single FC to FC task was taking up to 30 minutes. I do this a couple of times and killed the script after an hour. So I copied the exact same script to another pc with ArcMap 10 (no SP2) and ran the same script. It took about 6 minutes on that machine. I tested the FC to FC tool in ArcToolbox and again the process was taking a ridiculous amount of time to export a single FeatureClass. Here is an old log from my machine (pre-SP2) for reference.
2011-05-03 07:05:51.416000 | Create SDE Connection file and export SDE Features to Shapefiles
2011-05-03 07:06:00.709000 | SDE Connection created successfully
2011-05-03 07:06:00.709000 | SDE Connection file is ready
2011-05-03 07:06:00.709000 | Export SDE Nodes to shp
2011-05-03 07:06:00.709000 | Export SDE Pipes to shp
2011-05-03 07:08:33.498000 | Delete original locarc shapefile
2011-05-03 07:08:33.701000 | Rename new locarc shapefile to replace old shapefile
2011-05-03 07:08:34.029000 | Export SDE local lines to shp
2011-05-03 07:12:38.404000 | Create SDE Connection file and export SDE Features to Shapefiles
2011-05-03 07:12:46.118000 | SDE Connection created successfully
2011-05-03 07:12:46.118000 | SDE Connection file is ready
2011-05-03 07:12:46.118000 | Export SDE Nodes to shp
2011-05-03 07:12:46.118000 | Export SDE Pipes to shp
2011-05-03 07:12:46.118000 | Export SDE local lines to shp
2011-05-03 07:15:02.437000 | Delete original locnode shapefile
2011-05-03 07:15:02.593000 | Rename new locnode shapefile to replace old shapefile
2011-05-03 07:15:02.859000 | Export SDE local lines to shp
2011-05-03 07:15:02.859000 | Export of SDE to SHP completed successfully
This script exports four SDE features to shapefiles as well as performs some other calculations. The only place that seems to get hung up in the script is the Feature Class to Feature Class operation. My script can't even finish with SP2 install, so I don't have a current log file. I'll try to let it run tonight to see if I can finish saving a log file with accurate times. Has anyone else experienced similar issues with SP2? Is there a bug list somewhere maybe I can refer to? For reference, my current ArcMap/ArcCatalog build is build 3200 with SP2. My previous ArcMap/ArcCatalog build (and current build of all other ArcMap installs in office) is build 2800. Thank you.
... View more
05-27-2011
12:52 PM
|
0
|
11
|
11719
|
|
POST
|
You want to create a new SpatialReference http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/SpatialReference.html so it would look like query.outSpatialReference = new com.esri.ags.SpatialRefence(102100);
... View more
05-24-2011
09:36 AM
|
0
|
0
|
476
|
|
POST
|
For Flexviewer? This is built in to the Navigation widget in the latest Flexviewer release. Just above the navigation slider.
... View more
05-19-2011
11:31 AM
|
0
|
0
|
1516
|
|
POST
|
I haven't really thoroughly tested this, but it's working for me so far.
// minimum scale of map
// taken from http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer
private const SCALE:Number = 1128.497176;
private const LEVEL:int = 10;
private var _lods:Array;
// add this event listener somewhere
map.addEventListener(ExtentEvent.EXTENT_CHANGE, onMapExtentChange_handler);
protected function onMapExtentChange_handler(event:ExtentEvent):void
{
if (map.level)
{
if (!map.lods && map.scale > SCALE)
{
map.lods = _lods;
imageServiceLayer.visible = true;
}
else if (map.lods && LEVEL === map.level)
{
// somewhere in here
// you will need to turn off any TiledMapServiceLayer
// that has a minimum scale, like the World_Imagery service
// if not, this function will just get stuck in a loop
imageServiceLayer.visible = false;
_lods = map.lods;
map.lods = null;
// need to subtract a minor amout
// because map.scale
// is a number and precision issues
// were throwing off my map.scale > SCALE
// comparison above
map.scale = SCALE - 0.1;
}
}
}
In my case, I adjust the lods to only have 10 levels, but you'll want to use however many levels are in your app. You could probably just assign it from when the Map first loads and grab the map.lods.length and use that value through the rest of your application. I have been putting off really working on this because the functionality was broken in 2.X up until 2.1 or 2.2 I think, and I just have not gotten around to working it back in.
... View more
05-19-2011
08:28 AM
|
0
|
0
|
1631
|
|
POST
|
wsdl web services would probably suit most needs, depending on what you are doing. We started off using web services for some basic db queries, but when we moved to actually needing to do some ArcObjects for things like flow tracing or multiple spatial queries, we moved to WebOrb. I'm a big WebOrb fan, because if you can compile your functions to a dll, it's as simple as dropping it in a folder in your WebOrb directory and you can use it. There's even a browser console that will let you test your functions and provide sample code for Flex/Silverlight/Javascript. If you want to take advantage of using RemoteObjects with WebOrb or even FlourineFX, I put a library up of .net objects that serialize to their Flex counterparts. https://github.com/odoe/esri_dotnet_flex
... View more
05-17-2011
06:26 AM
|
0
|
0
|
1049
|
|
POST
|
If it weren't for the mirror image issue, you could. Unfortuntely, I don't know how to get around that without first doing the preview because the Flash player has built in security that will not allow you to save a file without some sort of user interaction such as a button click. You can't do it off a timer or another other event. I have not tried to simulate a button click, but I don't think that would work. If you want to look into a multi-page option, maybe PDF would be a better solution. http://code.google.com/p/alivepdf/ AlivePDF is an actionscript library to save PDF files directly from Flash. It's very popular among many users on this forum and the process is similar to the way you are saving an image.
... View more
05-17-2011
05:44 AM
|
0
|
0
|
1240
|
|
POST
|
Sure. The image data doesn't seem to like being added to the printBox until after the printBox is added to the stage. I updated the code sample in the link to reflect this. // I commented out this line of code
// where printImg is created
//printBox.addElement(printImg);
// I added this listener
printBox.addEventListener(Event.ADDED_TO_STAGE, function(e:Event):void {
trace("added to stage");
printBox.addElement(printImg);
}); Now, the image should display and save correctly. I have to admit, I don't know why the image displays backwards if it's added to the component before the component is added to the stage. AddedToStage fires as soon as the component comes on screen (not necessarily viewable), but before it's done being rendered. CreationComplete should fire when the component is fully rendered and ready to be viewed. I can't seem to find a Component Lifecycle reference online directly from Adobe, but here are some slides http://www.flex888.com/1219/flex-4-components-life-cycle.html Here is a diagram of the UIComponent lifecycle (I have this printed and tacked to my office wall) http://danorlando.com/?p=122 Spark skins have a few more things that happen to manage skinning http://help.adobe.com/en_US/flex/using/WS460ee381960520ad-2811830c121e9107ecb-7fff.html#WS460ee381960520ad-2811830c121e9107ecb-7ffc And I know there are quite a few god Flex books that should include a more detailed description of the lifecycle process of what happens when you create a component. You don't usually need to worry about waiting for most of these events anymore, maybe creationComplete if you are modifying an MXML component. Flex 4 and Skinnning have made build components much easier than it used to be. This is just an odd case because we are using a component as a reference to generate an image, so there are considerations that need to be made about when that component is actually fully rendered and ready to be captured. Hope that helps.
... View more
05-13-2011
09:36 AM
|
0
|
0
|
1240
|
|
POST
|
That was a weird one. It happened to me while testing, but if I waited for the addedToStage event, then add the image, it worked fine. That shouldn't happen if you wait for the creationComplete event, then view it.
... View more
05-13-2011
05:23 AM
|
0
|
0
|
1240
|
|
POST
|
Ok, I tried a few things, modifying the Print Widget in Flexviewer and it's not the addedToStage event you want to listen for. Sorry, I forgot that in Flex, the FlexEvent.CreationComplete is what fires when all flex components are done being created. When that fiires, you can encode the component to PNG/JPG. But, here's the rub. You can't use FileReference on FlexEvents, they're sandboxed for security purposes. So, you would probably need to create a small preview window, then have second button to actually save the data. I reviewed the print functionality in one of my apps,and this how we do it for PDF saves. I need to create a preview, then a button to actually save the file. Rather than post snippets or the whole thing here, you can see the dirty way I modified the print widget to do this. https://gist.github.com/969352 Hope that helps. Sorry I had to dust off the cobwebs on this one 🙂
... View more
05-12-2011
12:21 PM
|
0
|
0
|
2297
|
|
POST
|
Hmm, sorry, at this point, I'm at a loss. I tried pretty much the same to save a map and it worked. Can you see the preview on your screen with everything added to it?
... View more
05-12-2011
10:39 AM
|
0
|
0
|
2298
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 3 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 |
Online
|
| Date Last Visited |
yesterday
|