Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 3 of 3

Please help a desperate student!!

This is a discussion on Please help a desperate student!! within the MapPoint Desktop Discussion forums, part of the Map Forums category; Can someone please help me? I am creating a web application for my senior project that displays a map with ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    Please help a desperate student!!

    Can someone please help me? I am creating a web application for my senior project that displays a map with pushpins that are generated by multiple records from a database. I am going to be collecting an unknown number of address from a query and I need to convert that query into a mappoint dataset and then I need to turn around and display a map based on that dataset. Does anyone know how this can be done? I am trying to pass the results of the query that will return a map that I can put into my application. I am using VB.net. I am using the ax mappoint control. Please help me. If someone can give me code examples this will help me more than anyone can imagine.

  2. #2
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    Mappoint

    I am doing the exact same thing. If you have found a way, please let me know. I have data stored in SQL server and need to display address (up to 10) on a mappoint like screen in visual basic.

    Send an email if you have any information to freddie.hurtado@indymacbank.com

    Thanks
    Freddie

  3. #3
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    Mapping pushpins with addresses derived from query results

    Here's what I did in VBA (Access):

    Private Sub StartMapping()
    OpenMap
    Set ThisDb = CurrentDb
    Set rstLocations = ThisDb.OpenRecordset(conRowSource, dbOpenDynaset, dbSeeChanges, dbPessimistic)
    rstLocations.MoveLast
    intItemCount = rstLocations.RecordCount
    rstLocations.MoveFirst

    'conRowSource is a string that contains a query showing the addresses to be used for the pushpins

    Set List = Me![See Locations]
    List.RowSource = strSQL

    'strSQL is a string that contains a second query showing the names I'll match to addresses via the record number (Plaintiff_ID). List is a list box in which someone's already selected the desired names.

    For Each varItem In List.ItemsSelected
    intLocationCount = intLocationCount + 1
    intPlaintiffID = List.ItemData(varItem)
    rstLocations.FindFirst "[Plaintiff_ID]=" & intPlaintiffID
    Set objLoc = objMap.FindAddressResults(rstLocations!Street_Addr ess, rstLocations!City, , rstLocations!State, rstLocations!Zip)(1)
    Set objPushpin = objMap.AddPushpin(objLoc, rstLocations!Street_Address)
    With objPushpin
    .Name = CStr(i + 1)
    .Note = "" & rstLocations!Name & ""
    .BalloonState = geoDisplayBalloon
    .Symbol = objMap.Symbols.Item(10)
    .Highlight = True
    .Location.Goto
    End With
    Next varItem
    rstLocations.Close
    Set ThisDb = Nothing
    objMap.Altitude = conMapAltitude
    End Sub

    The idea is that when someone selects names in the list box, StartMapping opens a map & shows pushpins at the relevant addresses. Hope this helps.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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