Advertisement

09.06.2008 at 06:34PM PDT, ID: 23709488
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.0

How to create an function

Asked by TECH_NET in .NET, Programming for ASP.NET, Microsoft Visual Basic.Net

Tags: ,

I have a sub routine that loop through 10 data points for which i need to plot . for every loop, i the following code is being executed. I am not able to understand how i can create a new GP1 object for each loop.
Sub PlotPolyLine(ID,Latitude ,Longitude,InfoHTML )

'Create points for polyline
Dim GP1 As New GooglePoint()
GP1.ID = ID
GP1.Latitude = Latitude
GP1.Longitude = Longitude
GP1.InfoHTML = InfoHTML
GoogleMapForASPNet1.GoogleMapObject.Points.Add(GP1)
End sun

As you can see in the code snippet the definition of Gp1 and Gp2, Gp3 which are define static and not dynamic. How can i acheive this objective. Where i can retain the googlepoint() handle for each iteration through a loop
something like
for i=1 to 10
PlotPolyLine(ID,Latitude ,Longitude,InfoHTML  )
next i

Thanks. I hope i am making sense. I was told to use object programming..
 Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
'Create points for polyline 
Dim GP1 As New GooglePoint() 
GP1.ID = "GP1" 
GP1.Latitude = 43.65669 
GP1.Longitude = -79.44268 
GP1.InfoHTML = "This is point 1" 
GoogleMapForASPNet1.GoogleMapObject.Points.Add(GP1) 
 
Dim GP2 As New GooglePoint() 
GP2.ID = "GP2" 
GP2.Latitude = 43.66619 
GP2.Longitude = -79.44268 
GP2.InfoHTML = "This is point 2" 
GoogleMapForASPNet1.GoogleMapObject.Points.Add(GP2) 
 
Dim GP3 As New GooglePoint() 
GP3.ID = "GP3" 
GP3.Latitude = 43.67689 
GP3.Longitude = -79.4327 
GP3.InfoHTML = "This is point 3" 
GoogleMapForASPNet1.GoogleMapObject.Points.Add(GP3) 
 
'Create polyline between points GP1, GP2 and GP3
'Define polyline 
 Dim PL1 As New GooglePolyline()
 PL1.ID = "PL1"
'Give Hex code for line color 
PL1.ColorCode = "#0000FF"
'Specify width for line 
PL1.Width = 5
 
//Add points
 
PL1.Points.Add(GP1)
PL1.Points.Add(GP2)
PL1.Points.Add(GP3)
 
'Add Polyline to Google Map control,
 
GoogleMapForASPNet1.GoogleMapObject.Polylines.Add(PL1)
[+][-]09.06.2008 at 08:21PM PDT, ID: 22410014

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.06.2008 at 08:48PM PDT, ID: 22410079

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.08.2008 at 09:36AM PDT, ID: 22419073

View this solution now by starting your 14-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET, Programming for ASP.NET, Microsoft Visual Basic.Net
Tags: Microsoft, ASP.net VB.net
Sign Up Now!
Solution Provided By: VBRocks
Participating Experts: 2
Solution Grade: A
 
 
[+][-]10.06.2008 at 05:49PM PDT, ID: 22655756

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 14-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]10.10.2008 at 08:20PM PDT, ID: 22692499

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 14-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43 / EE_QW_2_20070628