|
POST
|
Try embedding the image outside of the constructor.. I know it maybe a silly thing to try, but it�??s worth a shot.. Here is some sample of the code�?�.
[Bindable]
[@Embed(source='../assets/images/myImage.png')]
private var myImage:Class;
private function XYZ():void
{
var pictureMarker:PictureMarkerSymbol = new PictureMarkerSymbol(myImage,16,16);
..
..
..
}
... View more
08-02-2010
09:42 AM
|
0
|
0
|
826
|
|
POST
|
Well it sounds like your XY is okay.. I am not using the ESRI Flex Viewer so I can not confirm your path, but usually Flex Builder will yell at you if your Embedded path is incorrect.. Do you see any warnings or get a Build error ? Here are a few things I would try... - Confirm the path. - Test it without embedding the image - Make sure the width and height of the image are as you defined in the constructor... - Find a sample in the ESRI Flex Viewer source code and use that to confirm it works.. Drew
... View more
08-02-2010
09:16 AM
|
0
|
0
|
826
|
|
POST
|
Have you confirmed the XY by testing using a SimpleMarkerSymbol(..) ? This will ensure the XY are correct and in the correct coordinate system. Drew
... View more
08-02-2010
08:38 AM
|
0
|
0
|
826
|
|
POST
|
You could probably just get a child by name.. Be sure to set the name property when creating your controls dynamically so you can later refer to them.. then try a method like below to get your checkbox.
private function getCheckBoxByName(name:String):CheckBox
{
var chk:CheckBox = myForm.getChildByName(name) as CheckBox;
return chk;
}
Where myForm is the id of your form. Drew
... View more
07-16-2010
12:39 PM
|
0
|
0
|
217
|
|
POST
|
If the URL is just &name=value pairs you can use the URLVariables object. There is a decode() method that should do the trick. Adobe Docs http://www.adobe.com/livedocs/flex/201/langref/flash/net/URLVariables.html Some samples here: http://actionscriptexamples.com/2008/02/27/decoding-url-encoded-strings-in-a-flash-application-using-the-urlvariables-class-in-actionscript-30/ Drew
... View more
07-15-2010
08:54 AM
|
0
|
0
|
494
|
|
POST
|
There is a decent sample here that shows how to use the WebMercatorUtil http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=MapCoordinates
... View more
07-12-2010
07:45 AM
|
0
|
0
|
982
|
|
POST
|
If you want to use lat/long you will need to change your SpatialReference to be 4326 replace
var myGraphicMarker:Graphic = new Graphic(new MapPoint(1447100, 7477200, new SpatialReference(102100)),
with
var myGraphicMarker:Graphic = new Graphic(new MapPoint(-71.98, 45.33, new SpatialReference(4326)),
Drew
... View more
07-12-2010
07:14 AM
|
0
|
0
|
982
|
|
POST
|
Firebug is a good utility to help solve little problems .. You can watch the HTTP request & response to help debug. http://getfirebug.com/ ( requires firefox) Drew
... View more
07-07-2010
05:26 AM
|
0
|
0
|
166
|
|
POST
|
works for me.. here is a full application you can test that is derived form the ESRI samples.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:esri="http://www.esri.com/2008/ags"
pageTitle="Query Task (without a map)">
<!--
Problem:
How to query the server?
Solution:
Send the query using the execute() method on a QueryTask.
This sample sets up a QueryTask (what layer on what server to query).
When user clicks the "Get Details" button, a Query is sent with the
user-provided text to search for.
Meanwhile a DataGrid has been setup and listens for the results
(using executeLastResult) from the querytask.
-->
<!-- Start Declarations -->
<esri:QueryTask
id="queryTask"
url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5"/>
<esri:Query
id="query"
returnGeometry="false"
where="STATE_NAME = '{stateName.text}'"
outFields='["STATE_NAME","STATE_FIPS","SUB_REGION","STATE_ABBR","POP2000","POP2007"]'/>
<!-- End Declarations -->
<mx:Panel title="Using Query tasks without maps">
<mx:HBox>
<mx:Label text="US state name: " />
<mx:TextInput id="stateName" text="Colorado" />
<mx:Button label="Get Details" click="queryTask.execute(query);" />
</mx:HBox>
<mx:DataGrid id="resultsGrid" dataProvider="{queryTask.executeLastResult.attributes}" visible="{queryTask.executeLastResult != null}" >
<mx:columns>
<mx:DataGridColumn headerText="State Name" dataField="STATE_NAME"/>
<mx:DataGridColumn headerText="Region" dataField="SUB_REGION"/>
<mx:DataGridColumn headerText="FIPS" dataField="STATE_FIPS"/>
<mx:DataGridColumn headerText="Abbreviation" dataField="STATE_ABBR"/>
<mx:DataGridColumn headerText="Population 2000" dataField="POP2000"/>
<mx:DataGridColumn headerText="Population 2007" dataField="POP2007"/>
</mx:columns>
</mx:DataGrid>
</mx:Panel>
</mx:Application>
... View more
07-07-2010
05:11 AM
|
0
|
0
|
896
|
|
POST
|
Like so.. <esri:Query id="query" returnGeometry="false" where="STATE_NAME = '{qTextAdd.text}'" outFields='["STATE_NAME","STATE_FIPS","SUB_REGION","STATE_ABBR","POP2000","POP2007"]'/>
... View more
07-07-2010
04:48 AM
|
0
|
0
|
896
|
|
POST
|
Here is how I would do it�?� �?� I would create a .NET web service that accepted an extent as a parameter �?� Using the ArcGIS SOAP API I would then generate a map with the extent that was passed in. o More on SOAP API here: http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/developer/ArcGIS/SOAP/overview.htm �?� Then export the map as a PNG �?� Once you get that far try modifying your web service to accept geometry and symbology.. This will be the hard part, but as mentioned before keep it simple. �?� Once you have a good representation of the geometry (in xy coordinates) on the .NET side add the graphics to the map o You can find samples here: http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/developer/ArcGIS/SOAP/map_overview.htm o Then try exporting your map image (using the SOAP API still) as a PNG This is not the easiest thing to explain without major code samples and I am sorry but I don�??t have them. If you wanted to get this done quick and dirty you can just use the Flex Screen Capture functionality to get an image but it won�??t be the correct width and height.. it will be just what the user sees. See more on this here: http://blog.empiregpservices.com/post.cfm/flex-capturing-a-screen-shot-and-download-it-example
... View more
07-07-2010
04:29 AM
|
0
|
0
|
724
|
|
POST
|
<esri:Query id="query" returnGeometry="true" where="STATE_NAME='Carolina'" outFields='["STATE_NAME","STATE_FIPS","SUB_REGION","STATE_ABBR","POP2000","POP2007"]'/>
... View more
07-06-2010
11:51 AM
|
0
|
0
|
896
|
|
POST
|
Paul, See this sample to query your features table. http://resources.esri.com/help/9.3/arcgisserver/apis/flex/samples/index.html?sample=QueryTaskNoMap EDIT: Then add the "where" clause as outlined in the docs. http://resources.esri.com/help/9.3/arcgisserver/apis/flex/apiref/com/esri/ags/tasks/Query.html You can view all the ESRI Flex 1.3 samples here if you wish to explore further. http://resources.esri.com/help/9.3/arcgisserver/apis/flex/samples/index.html
... View more
07-06-2010
10:09 AM
|
0
|
0
|
896
|
|
POST
|
Well..are you drawing the map on the .NET side also or just sending back the map URL to your web service?
... View more
07-06-2010
04:44 AM
|
0
|
0
|
724
|
|
POST
|
Well If you are saying you want the custom drawings on the prints you generate using .NET you will have to send the geometry and symbology back to the server and redraw them on your server side map. This will be easier said than done, but here are some steps�?� �?� Use the Flex API to allow the user to draw on the map. �?� When the user wants to print you will have to convert the custom drawings to a object to send with your .NET web service. This object will have to include the geometry and symbology of the markup(s). I would keep it simple at first. �?� On the server side (assuming you have all the geometry and the symbology) you will have to redraw the users markup on the map so it gets embedded into the file you return. I hope I am understanding your question correctly.. please let me know if I am not. Drew
... View more
07-02-2010
07:55 AM
|
0
|
0
|
724
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-04-2013 09:40 AM | |
| 1 | 12-11-2012 10:19 AM | |
| 1 | 05-25-2015 10:46 AM | |
| 1 | 05-10-2016 06:31 AM | |
| 1 | 01-17-2017 11:01 AM |
| Online Status |
Offline
|
| Date Last Visited |
12-31-2021
09:54 AM
|