Hello, i'm new here..i'm a student and i have some problems with my GIS Project. I'm using Visual Studio 2008 SP1 combined with ArcGIS Explorer. The problem i has with this project is, i don't know how to connect the database on my KML file, that is a map file with the database contains details for the KML File..The link below is the sample that i have to refer to but the sample uses web service that is ws.geonames.org.
http://help.arcgis.c...00000054000000/
Please help me..
Problem with GIS
Page 1 of 16 Replies - 221 Views - Last Post: 07 February 2012 - 05:14 PM
Topic Sponsor:
Replies To: Problem with GIS
#2
Re: Problem with GIS
Posted 30 January 2012 - 09:44 PM
Additional Problem ++
Everytime i change the code, when i open the ArcGis Explorer Software, it keeps crashing and crashing..i dont know why..hope u guys can help me..
the software that i'm using is
Visual Studio 2008 SP1
ArcGIS Explorer Build 1500 SDK
Everytime i change the code, when i open the ArcGis Explorer Software, it keeps crashing and crashing..i dont know why..hope u guys can help me..
the software that i'm using is
Visual Studio 2008 SP1
ArcGIS Explorer Build 1500 SDK
#3
Re: Problem with GIS
Posted 30 January 2012 - 10:15 PM
An ArcGIS forum might be a better place for this. You could also show the code your using so we can evaluate that for poss problems. Try/Catch blocks are great for gathering error information. Debugging also helps so you can check variables and see what line the error occurs. Thanks for helping us help you. Welcome to the forum!
#4
Re: Problem with GIS
Posted 30 January 2012 - 11:06 PM
Thx for your reply sir..actually, the GIS Forum seems to be "quiet" since last year..i dont know why..i've post this topic there but no one replies for 3 weeks since i post that..
Actually, its not an error that i was talk about..i just want to know,how to exchange this _webCilent thing to import file from my computer..there is a file that i've compiled named Mineral.KML and its database that contain the data i've key in..the problem is, i don't know how to change this code that can make it's read a file and its database..kinda complicated to explain..its more like GOOGLE MAP but its GIS VERSION using ARCGIS EXPLORER...
To make it understandable, when u search a place that u want, it only shows the place that i've only key in, not from the web base..this is the sample which its grab a service from a website named, ws.geonames.org
Actually, its not an error that i was talk about..i just want to know,how to exchange this _webCilent thing to import file from my computer..there is a file that i've compiled named Mineral.KML and its database that contain the data i've key in..the problem is, i don't know how to change this code that can make it's read a file and its database..kinda complicated to explain..its more like GOOGLE MAP but its GIS VERSION using ARCGIS EXPLORER...
To make it understandable, when u search a place that u want, it only shows the place that i've only key in, not from the web base..this is the sample which its grab a service from a website named, ws.geonames.org
Private Sub _webClient_DownloadCompleted(ByVal sender As Object, ByVal e As AsyncCompletedEventArgs)
' read the xml file
'
Dim doc As XmlDocument = New XmlDocument()
doc.Load(_resultFile)
For Each xmlNode As XmlNode In doc.SelectNodes("/geonames/geoname")
Dim lat As Double = Double.Parse(xmlNode.SelectSingleNode("lat").InnerText)
Dim lon As Double = Double.Parse(xmlNode.SelectSingleNode("lng").InnerText)
Dim elev As Double = Double.NaN
Double.TryParse(xmlNode.SelectSingleNode("elevation").InnerText, elev)
Dim graphic As Graphic = CreateGraphic(xmlNode.SelectSingleNode("name").InnerText, xmlNode.SelectSingleNode("adminName1").InnerText, xmlNode.SelectSingleNode("countryName").InnerText, lat, lon, elev)
Dim treeNode As New TreeNode(graphic.Label)
treeNode.Tag = graphic
treeView1.Nodes.Add(treeNode)
Next xmlNode
EnableControls(True)
' zoom to the first node in the tree
'
If treeView1.Nodes.Count > 0 Then
ZoomTo(treeView1.Nodes(0))
End If
End Sub
This post has been edited by smohd: 31 January 2012 - 12:12 AM
Reason for edit:: Code tags added. Please use [code] tags when posting codes
#5
Re: Problem with GIS
Posted 02 February 2012 - 07:36 PM
Please anyone that can help me with this..i am totally in trouble..
#6
Re: Problem with GIS
Posted 02 February 2012 - 08:31 PM
Private Sub _webClient_DownloadCompleted(ByVal sender As Object, ByVal e As AsyncCompletedEventArgs)
' read the xml file
' what file? e.Result?
Dim doc As XmlDocument = New XmlDocument()
doc.Load(_resultFile) '<- what?
For Each xmlNode As XmlNode In doc.SelectNodes("/geonames/geoname")
Dim lat As Double = Double.Parse(xmlNode.SelectSingleNode("lat").InnerText)
Dim lon As Double = Double.Parse(xmlNode.SelectSingleNode("lng").InnerText)
Dim elev As Double
'proper way to use TryParse
'only run the code if it passes
If Double.TryParse(xmlNode.SelectSingleNode("elevation").InnerText, elev) Then
'what is this part??? Do you mean Graphics?
Dim graphic As Graphic = CreateGraphic(xmlNode.SelectSingleNode("name").InnerText, xmlNode.SelectSingleNode("adminName1").InnerText, xmlNode.SelectSingleNode("countryName").InnerText, lat, lon, elev)
Dim treeNode As New TreeNode(graphic.Label)
treeNode.Tag = graphic
treeView1.Nodes.Add(treeNode)
End If
Next xmlNode
EnableControls(True)
' zoom to the first node in the tree
'
If treeView1.Nodes.Count > 0 Then
ZoomTo(treeView1.Nodes(0))
End If
End Sub
This post has been edited by _HAWK_: 02 February 2012 - 08:33 PM
#7
Re: Problem with GIS
Posted 07 February 2012 - 05:14 PM
Actually Hawk..the coding is longer than u think..i cant post the whole thing there..but u can find the sample at here..
http://help.arcgis.c...00000054000000/
Thanks for the feedback..=)
http://help.arcgis.c...00000054000000/
Thanks for the feedback..=)
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote



|