|
POST
|
I remember seeing a post where a user ran into the maximum number of layers (around 20 or so) that could be added to a map, but I haven't been able to find the thread.
... View more
09-01-2011
05:43 AM
|
0
|
0
|
458
|
|
POST
|
You can use the Map's Reorder method to change the order of the layers.
... View more
08-31-2011
06:51 AM
|
0
|
0
|
535
|
|
POST
|
I didn't wrap my legend in a scroller, but put it in a VGroup along with a transparency slider.
<s:VGroup id="legendGroup" width="100%" height="100%" visible="{layerBenthic.visible}">
<s:HGroup width="100%" horizontalAlign="center" paddingTop="10">
<s:VGroup width="100%" horizontalAlign="center">
<s:Label text="Layer Transparency"/>
<s:HSlider id="toolAlpha" minimum="0" maximum="100" snapInterval="1" liveDragging="true"
width="75%" change="changeTransparency()" value="100"/>
</s:VGroup>
</s:HGroup>
<esri:Legend id="legendMap" map="{mapMain}" layers="{layerBenthic}" width="100%" height="100%"
respectCurrentMapScale="true" x="10" />
</s:VGroup>
... View more
08-30-2011
06:10 AM
|
0
|
0
|
871
|
|
POST
|
The ArcGIS Viewer for Flex forum was set up for posing questions about widgets and searching for answers about them.
... View more
08-26-2011
05:20 AM
|
0
|
0
|
502
|
|
POST
|
Thanks, Robert. This is another great example of your invaluable help to this forum.
... View more
08-18-2011
04:17 AM
|
0
|
0
|
1108
|
|
POST
|
Hi Robert, I've been using your Navigation tool in one of my projects, where the code has been put into a separate directory and linked to the project by Source Path. It's a great tool that I really appreciate your work on and it's been working just as expected. However, I've started another project (FB 4.5.1 and API 2.4) and have set it up the same way, but here I'm getting the error The skin part type 'mx.controls:VSlider' must be assignable to 'spark.components.supportClasses:SliderBase'. in the line [HostComponent("com.esri.ags.components.Navigation")] Why would this work in one project but not the other?
... View more
08-17-2011
07:15 AM
|
0
|
0
|
1108
|
|
POST
|
You will not find the references for the Geoprocessing tools using "Add ArcGIS Reference". You'll have to use "Add Reference" and select the .NET tab.
... View more
08-15-2011
05:47 AM
|
0
|
0
|
329
|
|
POST
|
The ArcGIS Viewer for Flex forum was created for questions like this.
... View more
08-11-2011
12:00 PM
|
0
|
0
|
355
|
|
POST
|
It works in Chrome 13 and IE 8 but not in Firefox 5. Basically, you need to interact with the map first by zooming or panning before the onclick returns something. I had this problem in Flex and got around it by adding in an alert box in the initialization. Closing the alert box provided the map interaction necessary to allow the map click to work without panning or zooming.
... View more
08-09-2011
10:47 AM
|
0
|
0
|
1277
|
|
POST
|
To add in the url, try this code by Robert Scheitlin. Here's how I use it in one of my applications.
... View more
08-09-2011
07:39 AM
|
0
|
0
|
439
|
|
POST
|
Hi Carlos, I'm glad to hear you're making progress. Since you don't have the code to show why the Clip process didn't run, examine the Results information in ArcMap to find out what happened. Could it be that it's not overwriting "in_memory\APP_ENS_OVERLAP"? Have you set the Geoprocessor to overwrite outputs, either through the Geoprocessing Options dialog or by setting pGeoprocessor.OverwriteOutput = "true"
... View more
08-09-2011
07:18 AM
|
0
|
0
|
1288
|
|
POST
|
My code makes calls to functions containing the geoprocessing tools. I've declared the geoprocessor Global.GP in another module and initialized it elsewhere
pDissolvedFClass = DissolveDataset(pResourceFClass, DissolveFieldName, StatisticsFieldName & " " & Stat, "in_memory\DissolvedResource")
Friend Function DissolveDataset(ByVal InputName As Object, ByVal DissolveField As String, ByVal StatsFields As String, ByVal OutputName As String) As ESRI.ArcGIS.Geodatabase.IFeatureClass
Dim DissolveDS As New ESRI.ArcGIS.DataManagementTools.Dissolve
Dim Result As ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult2
Try
Using releaser As New ESRI.ArcGIS.ADF.ComReleaser
releaser.ManageLifetime(DissolveDS)
DissolveDS.in_features = InputName
DissolveDS.dissolve_field = DissolveField
DissolveDS.statistics_fields = StatsFields
DissolveDS.out_feature_class = OutputName
Result = RunTool(DissolveDS, Nothing)
If Result Is Nothing Then
System.Windows.Forms.MessageBox.Show("Could not dissolve dataset")
Return Nothing
End If
Return ReturnObjectfromResult(Result, "Feature Class")
End Using
Catch ex As Exception
System.Windows.Forms.MessageBox.Show(ex.ToString, "Dissolve error")
Return Nothing
End Try
End Function
Friend Function ReturnObjectfromResult(ByVal result As ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult2, ByVal Type As String) As Object
Dim GPVal As ESRI.ArcGIS.Geodatabase.IGPValue
Dim InMemFC As String
Dim GPUtil As ESRI.ArcGIS.Geoprocessing.IGPUtilities3 = New ESRI.ArcGIS.Geoprocessing.GPUtilities
Try
GPVal = result.GetOutput(0)
InMemFC = GPVal.GetAsText()
Select Case Type
Case "Feature Class"
Return GPUtil.OpenFeatureClassFromString(InMemFC)
Case "Table"
Return GPUtil.OpenTableFromString(InMemFC)
End Select
Catch ex As Exception
System.Windows.Forms.MessageBox.Show(ex.ToString, "Return FeatureClass error")
Return Nothing
End Try
End Function
Private Sub ReturnMessages(ByVal pResult As ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult2, ByVal Title As String)
Dim ErrorMessage As String
If pResult.MessageCount > 0 Then
For Count As Integer = 0 To pResult.MessageCount - 1
ErrorMessage += pResult.GetMessage(Count)
Next
End If
System.Windows.Forms.MessageBox.Show(ErrorMessage, Title)
End Sub
Friend Function RunTool(ByVal Process As ESRI.ArcGIS.Geoprocessor.IGPProcess, ByVal TC As ESRI.ArcGIS.esriSystem.ITrackCancel2) As ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult2
Dim Result As ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult2
Try
Result = CType(Globals.GP.Execute(Process, Nothing), ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult2)
If Result.Status <> ESRI.ArcGIS.esriSystem.esriJobStatus.esriJobSucceeded Then ReturnMessages(Result, "Geoprocessing Error")
Globals.GP.ClearMessages()
Catch ex As Exception
ReturnMessages(Result, "Fail")
System.Windows.Forms.MessageBox.Show(ex.ToString, "Run Geoprocessor")
End Try
Return Result
End Function
... View more
08-04-2011
11:50 AM
|
0
|
0
|
1288
|
|
POST
|
I haven't tried using the IMemoryWorkSpaceFactory, but I have been able to use a geoprocessor process parameter like "in_memory\output"
... View more
08-04-2011
11:22 AM
|
0
|
0
|
1288
|
|
POST
|
The button bar uses a zero based index, so your code show be like this (if Avatud Maakaart refers to OpenStreetMap)
<esri:ArcGISTiledMapServiceLayer show="layerShowHandler(event)"
url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"
visible="{bb.selectedIndex == 1}"/>
<esri:OpenStreetMapLayer show="layerShowHandler(event)"
visible="{bb.selectedIndex == 0}"/>
... View more
08-03-2011
06:30 AM
|
0
|
0
|
300
|
|
POST
|
This is the way I've set up an application (not in the SFV framework) to read in a configuration file. The application is a framework where I'm showing the data for several different projects and the XML contains all the parameters for each project, including map service and query URLs. I pass in a parameter in the main URL for the specific project: http://ccma.nos.noaa.gov/explorer/biomapper/biomapper.html?id=JobosBay http://ccma.nos.noaa.gov/explorer/biomapper/biomapper.html?id=StJohn This is the code for the Flex application to read in the XML file
private var xmlParameters:XML;
private var xmlProjectParameters:XMLList;
private function init():void
{
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.addEventListener(Event.COMPLETE,init_onComplete);
xmlLoader.addEventListener(IOErrorEvent.IO_ERROR,fail);
xmlLoader.load(new URLRequest("parameters.xml"));
}
private function fail(event:Event)
{
Alert.show("Fail");
}
private function init_onComplete(event:Event):void
{
var params:Object;
try
{
var loader:URLLoader = URLLoader(event.target);
xmlParameters = new XML(loader.data);
params = getURLParameters();
if (params["id"])
{
input = params.id
}
else
{
Alert.show("Parameter search failed");
return;
}
xmlProjectParameters = xmlParameters.project.(@urlinput==input);
var bm:IBrowserManager = BrowserManager.getInstance();
bm.init();
bm.setTitle(xmlProjectParameters.@id + " BIOMapper");
serverName = xmlProjectParameters.service;
projectTitle = xmlProjectParameters.projectname.@name;
if (!(xmlProjectParameters.datalayers.dive==undefined))
{
diveQueryTask.url = serverName + xmlProjectParameters.datalayers.dive.@url + "/MapServer/" + xmlProjectParameters.datalayers.dive.@layer;
etc...
}
private function getURLParameters():Object
{
var result:URLVariables = new URLVariables();
try
{
if (ExternalInterface.available)
{
var search:String = ExternalInterface.call("location.search.substring", 1);
if (search && search.length > 0)
{
result.decode(search);
}
}
}
catch (error:Error)
{
Alert.show(error.toString());
}
return result;
}
And this is the code for the XML file
<?xml version="1.0" encoding="utf-8"?>
<projects>
<project id="Jobos Bay" urlinput="JobosBay">
<projectname name ="Jobos Bay, PR" pdftitle="Jobos Bay, PR: Shallow-water Benthic Habitats" url="http://ccma.nos.noaa.gov/ecosystems/coralreef/ceap/"/>
<service>http://egisws02.nos.noaa.gov/ArcGIS/rest/services/biomapper/Jobos_</service>
<datalayers>
<dive layer="0" url="Dynamic" site_id="Site_ID" videoname="Site_ID" assessment="Assessment" photocount="PhotoCount" symbol="Symbol" legendurl="http://ccma.nos.noaa.gov/explorer/biomapper/jobosbay/images/Dives.png" legendheight="53">
</dive>
</datalayers>
etc
</project>
<project id="St. John" urlinput="StJohn">
<projectname name="St. John, U.S. Virgin Islands" pdftitle="U.S. Virgin Islands (St. John): Shallow- and Moderate-Depth Benthic Habitats" url="http://ccma.nos.noaa.gov/ecosystems/coralreef/benthic/"/>
<service>http://egisws02.nos.noaa.gov/ArcGIS/rest/services/biomapper/StJ_</service>
<datalayers>
<dive layer="13" url="all" site_id="SITE_ID" videoname="VIDEONAME" assessment="ASSESSMENT" photocount="PHOTOCOUNT" symbol="SYMBOL" legendurl="http://ccma.nos.noaa.gov/explorer/biomapper/stjohn/images/Dives.png" legendheight="103">
</dive>
etc.
</project>
</projects>
... View more
07-26-2011
06:15 AM
|
0
|
0
|
652
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 3 weeks ago | |
| 2 | 3 weeks ago | |
| 1 | 4 weeks ago | |
| 1 | 4 weeks ago | |
| 1 | a month ago |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|