|
POST
|
Well I am getting closer. The following code allows me to add only the layers I want. The only problem is that the layers show up in the contents but nothing is on the map display. Any ideas? Dim m_disp As MapDisplay = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay
'Define the connection properties
Dim connProps As ServiceConnectionProperties = New ServiceConnectionProperties(ServiceType.Ims, New Uri("http://nowcoast.noaa.gov"), "nowcoast")
'Create a new ServiceLayer
Dim svcLayer As ServiceLayer = New ServiceLayer(connProps)
'Name Layer
svcLayer.Name = "Hurricane Track"
'Connect to Service
Dim connected As Boolean = svcLayer.Connect()
'Array list of layers to connect to
Dim LayerList As New ArrayList()
LayerList.Add("Tornado Warnings")
LayerList.Add("Flood Warnings")
LayerList.Add("Flash Flood Warnings")
LayerList.Add("Severe Thunderstorm Warnings")
LayerList.Add("Extreme Wind Warnings")
'Check to see whether the connection was successful and add layers from Array List
If (connected) Then
For Each NOAALayer As String In LayerList
For Each lyr As ServiceChildLayer In svcLayer.ChildItems
If lyr.Name = NOAALayer Then
lyr.Visible = True
m_disp.Map.ChildItems.Add(lyr)
Else
lyr.Visible = False
End If
Next
Next
Else
'Investigate connection issue.
Dim status As ConnectionStatus = svcLayer.ConnectionStatus
MsgBox("Server Connection Failed!" & status.ErrorString)
If status.HasError Then
System.Diagnostics.Debug.Print(status.ErrorString)
End If
End If
End Sub
... View more
07-26-2011
12:06 PM
|
0
|
0
|
1278
|
|
POST
|
Is there any way to change the parameters of a WMS request in AGX? I need to pull in Nowcoast data using WMS but the resolution of the labels is terrible. I want to change the image request size width/height to see if the quality would increase.
... View more
07-26-2011
09:19 AM
|
0
|
0
|
823
|
|
POST
|
If you want to use VB script you can start with this. '32 or 64 bit
Set WshShell = WScript.CreateObject("WScript.Shell")
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
strValueName = "PROCESSOR_ARCHITECTURE"
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
Call MsgBox("Current Processor Archiecture: " & strValue, vbOKOnly + vbInformation, "Installed OS")
Select Case strValue
Case "x86"
strKeyPath = "SOFTWARE\ESRI\Explorer1700\Settings"
strValueName = "Change for correct value"
dwValue = change to what you want
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
Case "x64"
strKeyPath = "SOFTWARE\Wow6432Node\ESRI\Explorer1700\Settings "
strValueName = "Change for correct value"
dwValue = change to what you want
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
End Select
... View more
07-22-2011
10:33 AM
|
0
|
0
|
829
|
|
POST
|
You can change the language of the program by going to the home button (round button in top left corner of AGX). Then click the ArcGIS explorer options button. Click common on the left. Towards the bottom there are a bunch of languages to select from. If you are looking for a language other than what is there I can't help you..
... View more
07-20-2011
11:11 AM
|
0
|
0
|
1400
|
|
POST
|
That worked perfectly on a IMS server hosted by USGS. I can't get it to work on the nowcoast server. It just hangs AGX up. At this point is seems more like an issue with AGX than anything else. As I said before the connection to nowcoast to ArcGIS Desktop works great.
... View more
07-20-2011
07:55 AM
|
0
|
0
|
1278
|
|
POST
|
I just realized that this is to remove layers from the service. I thought it was just choosing which ones to show. I actually need to remove about 100 layers from the srvice. This is not going to be fun. But if it the only way to do it, so be it.
... View more
07-20-2011
05:04 AM
|
0
|
0
|
1278
|
|
POST
|
Steve- Thanks for your reply. I am atempting to use your method but when connecting to the nowcoast.noaa.gov ArcIMS server, it is just locking up AGX for long periods of time. I am not sure why this is happening. Using ArcGIS Desktop I have no issue connecting and layers display fairly quickly. If anyone has a chance to (or has in the past) connect to http://nowcoast.noaa.gov ArcIMS server, please let me know if it works for you. I have never connected to an IMS server in AGX before. Hopefully there is not a known issue with this. Thanks.. Dim theMapItem As MapItem
Dim m_disp As MapDisplay = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay
'Define the connection properties
Dim connProps As ServiceConnectionProperties = New ServiceConnectionProperties(ServiceType.Ims, New Uri("http://nowcoast.noaa.gov"), "nowcoast")
'Create a new ServiceLayer
Dim svcLayer As ServiceLayer = New ServiceLayer(connProps)
'Name Layer
svcLayer.Name = "Hurricane Track"
'Connect to Service
Dim connected As Boolean = svcLayer.Connect()
'Add the layer to the map.
'Check to see whether the connection was successful
If (connected) Then
'Add the layer to the map.
theMapItem = svcLayer.FindByName("Tropical Cyclone Track Lines")
If Not (theMapItem Is Nothing) Then
theMapItem.RemoveFromParent()
theMapItem = Nothing
End If
m_disp.Map.ChildItems.Add(svcLayer)
Else
'Investigate connection issue.
MsgBox("Server Connection Failed!")
Dim status As ConnectionStatus = svcLayer.ConnectionStatus
If status.HasError Then
System.Diagnostics.Debug.Print(status.ErrorString)
End If
End If
... View more
07-20-2011
05:00 AM
|
0
|
0
|
1278
|
|
POST
|
Take a look at the samples provided with the AGX SDK located @ C:\Program Files\Explorer\DeveloperKit\Samples. I found them to be very helpful.
... View more
07-19-2011
12:03 PM
|
0
|
0
|
837
|
|
POST
|
I am trying to bring in the layers from NOAA Nowcoast using ArcIMS connection but it is extremely slow due to the number of layers in that connection. They also have WMS but the resolution on some of the items is very bad using WMS. My question is, is there a way to specify which layers I want to bring in to my map using ArcIMS? I appreciate any help.
... View more
07-19-2011
11:46 AM
|
0
|
4
|
1741
|
|
POST
|
Steve- I have not had a minute to work on this. The new spatial query in 1700 workds great with any lines or polygons. I wish I had the code to incoporate into my add-ins. Anyway, if you could share the vb.net version of the code Darryl supplied it would be greatly appreciated and save me some time. Thanks!
... View more
07-19-2011
09:11 AM
|
0
|
0
|
2498
|
|
POST
|
It can be done by creating an add-in (vb.net). I have done so but the code is specific to my application so it will not be useful to share the entire add in. If you would like to see some of the code I would be happy to share.
... View more
07-14-2011
12:01 PM
|
0
|
0
|
2449
|
|
POST
|
Works for me. You may weant to provide additional info to your issue so someone will be able to properly assist you.
... View more
07-13-2011
06:35 AM
|
0
|
0
|
1326
|
|
POST
|
I could not find anything in the SDK either. I think I will try to fumble through your second option to see what i can come up with. Thanks!
... View more
06-24-2011
11:17 AM
|
0
|
0
|
2498
|
|
POST
|
I can't get this layer by query code working. Any help is appreciated. Dim points As Table = tvwMapItems.SelectedNode.Tag Dim poly As Table = tvwMapItems2.SelectedNode.Tag 'Create a List to store ObjectID's Dim objectIDList As List(Of Integer) = New List(Of Integer)() 'Loop over each area and perform a spatial query to find points For Each polyArea As Row In poly.GetRows() Dim polyAreaShape As Geometry = polyArea.Geometry Dim foundPoints As RowCollection = points.Search(New Filter(polyAreaShape, FilterSearchOptions.Intersects)) For Each rw As Row In foundPoints objectIDList.Add(rw.ObjectID) Next Next ' create the table binding adapter and fill it Dim tableBindingAdapter As TableBindingAdapter = New TableBindingAdapter(points) tableBindingAdapter.UseColumnAliasNames = True tableBindingAdapter.UseCodedValueDomains = True tableBindingAdapter.Fill(objectIDList.ToArray()) ' display the results Dim resultsForm As QueryResultsForm = New QueryResultsForm(tableBindingAdapter) resultsForm.ShowDialog()
... View more
06-24-2011
09:12 AM
|
0
|
0
|
819
|
|
POST
|
In 1700 there is now a spatial query but it is not quite what i need. I am hoping to create an add-in in order to query layer based on a certain distance from from a kml point or polygon. Anyone have any ideas if this is feasible? I was thinking I may be able to use polygon.get point on all the points and do a SearchByDistance on each point adding them to my collection.
... View more
06-23-2011
11:07 AM
|
0
|
9
|
3556
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-21-2026 06:15 AM | |
| 4 | 03-12-2025 11:01 AM | |
| 3 | 01-08-2025 09:26 AM | |
| 1 | 01-08-2025 07:19 AM | |
| 1 | 12-06-2024 04:52 AM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|