Interactive Map

claire_bicknell

Well-known member
Joined
Dec 10, 2008
Messages
49
Programming Experience
Beginner
Hi.

I am very new to VB.Net and am currently working on creating an interactive map for shopping centres across the UK. I want to create a hot spot for each region on the map.

So for example: I have an image of the uk. I want to click "Manchester" and then the details related to manchester shopping centre (i.e shops) can be seen on the following pages.

How do i create a hot spot initially? I have created a Picture Box and have uploaded my map. Now Im stuck....

Really needing your help. Look forward to hearing from you :)
 
Hi John,

I tried starting a new project and guess what? It only worked!

I am still a little confused as to why it worked in a new project but not the existing... but i am on the right track again now.

Thanks for all your help
 
Hi John.

I have now come unstuck once again.

I am now looking at the hover over feature of the map. At the moment your code works perfectly and just returns "Manchester" and "Liverpool" etc when i hover over the correct regions on the map.

What I want and would love it to do would be for example:

1. Hover over Manchester on the map
2. Return the centreName, Address and telephoneNumber stored in my sql server database.

I don't want it to return "manchester" anymore, i would like this to be replaced with the above info.

How do i structure this within this method:

HTML:
Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
        Dim current As String = Me.ToolTip1.GetToolTip(Me.PictureBox1)
        For Each place As String In places.Keys
            If places(place).Contains(e.Location) Then
                If current <> place Then
                    Me.ToolTip1.Show(place, Me.PictureBox1)
                    Exit For
                End If
            End If
        Next
    End Sub

I think i am correct in thinking that the amendments must be made here. I have already tested the connection to my database and it is functioning correctly.

Looking forward to hearing from you.
 
You know your "place" id string and just need to make a loopup to your database, put the data you want together to a string and put that in the tooltip.show(text..) call.

If you need help with database interaction you should ask in Data Access forum or one of the Database forums, it is not really related to this topic. I will save you some time, you should be asked to read the "DW2" Data Walkthroughs in help, specifically the topic "Creating a Form to Search Data" where you will end up with TableAdapter that has a method like FillByCity, whereafter you will read out the string details. Again, for help with specifics in database handling ask the database forums.
 
Back
Top