MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Balloon Confusion

This is a discussion on Balloon Confusion within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I am mapping a few locations and I only want to display the pushpin.note. The location balloon also displays the ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-20-2006
Junior Member
Yellow Belt
 
Join Date: Jun 2006
Posts: 14
Balloon Confusion

I am mapping a few locations and I only want to display the pushpin.note. The location balloon also displays the address. Any help would be great. I am using the following code:

Code:
Sub MapSelectedProperties()
  'Map the selected properties
  On Error GoTo MapSelectedProperties_Err_Exit
  Dim db As Database
  Dim rstProps As Recordset
  
  Dim objLoc As MapPoint.Location
  Dim objMap As MapPoint.Map
  Dim objPushpin As MapPoint.Pushpin
  
  Dim strMsg As String
  Dim i As Integer
  i = 0
  Set db = CurrentDb()
  
  'Load the selected properties into a recordset
  Set rstProps = db.OpenRecordset("SELECT * FROM tblProperties WHERE ysnSelected = Yes;")
  'Make sure at least one property was selected
  If rstProps.RecordCount > 0 Then
    'Load Map
    If LoadMap() Then
      'Open the form containing the map
      FormOpen "frmMap"
      Set objMap = gappMP.ActiveMap
      'Place a pushpin on the map for each selected property
      While Not rstProps.EOF
        i = i + 1
        Set objLoc = objMap.FindAddressResults(rstProps!strStreet, rstProps!strCity, rstProps!strState, rstProps!strPostalCode)(1)
        Set objPushpin = objMap.AddPushpin(objLoc, rstProps!strStreet)
        objPushpin.Name = CStr(i)
        objPushpin.Note = rstProps!curListPrice & " " & "Total Machines: " & rstProps!machinecount
        objPushpin.BalloonState = geoDisplayBalloon
        objPushpin.Symbol = 4
        objPushpin.Highlight = True
        rstProps.MoveNext
      Wend
      'Show all pushpins on the map display
      objMap.DataSets.ZoomTo
    Else
      strMsg = "Unable to load map."
      MsgBox strMsg, vbOKOnly + vbExclamation, APP_NAME
    End If
  Else
    strMsg = "No properties selected."
    MsgBox strMsg, vbOKOnly + vbExclamation, APP_NAME
  End If
MapSelectedProperties_Err_Exit:
  On Error Resume Next
  Set objPushpin = Nothing
  Set objLoc = Nothing
  Set objMap = Nothing
  rstProps.Close
  db.Close
  Exit Sub
MapSelectedProperties_Err:
  Resume MapSelectedProperties_Err_Exit
End Sub

Last edited by Wilfried; 10-22-2006 at 01:57 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 10-21-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
Re: Balloon Confusion

Hi,

I'm not sure if I understeand what you ask. The display balloon displays the string you assign to it, no more and no less. So you loop trough a table and assign pushpin name and notes. That's what is displayed

If I understeand wrong please explain again
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 10-21-2006
Junior Member
Yellow Belt
 
Join Date: Jun 2006
Posts: 14
Re: Balloon Confusion

I didnt write the code I included but copied it from an existing program. The code works fine. The balloon currently displays the address, city and state. It also displays the note. I only want the note displayed and don't know which line of the code to remove.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 10-22-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
Re: Balloon Confusion

Hi,

Code:
      While Not rstProps.EOF
        i = i + 1
        Set objLoc = objMap.FindAddressResults(rstProps!strStreet, rstProps!strCity, rstProps!strState, rstProps!strPostalCode)(1)
        Set objPushpin = objMap.AddPushpin(objLoc, rstProps!strStreet)
        objPushpin.Name = CStr(i)
        objPushpin.Note = rstProps!curListPrice & " " & "Total Machines: " & rstProps!machinecount
You loop here in a table. The last line is assigning different things to the pushpin's note. If you comment it then the note is empty, or change it so that it only contains the fields of the table you wants.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 10-22-2006
Junior Member
Yellow Belt
 
Join Date: Jun 2006
Posts: 14
Re: Balloon Confusion

Thanks but I'm still confused. The note is what I want. I dont want to display the address. If I comment out the note then just the address will show in the balloon.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 10-24-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
Re: Balloon Confusion

Hi,

Probably the name of the pushpin is the address. Your code does not show what is assigned to CStr. Comment out next line:
Code:
objPushpin.Name = CStr(i)
But I'm not sure you can have multiple pushpins with same name (or no name). But you can try.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 10-24-2006
Junior Member
Yellow Belt
 
Join Date: Jun 2006
Posts: 14
Re: Balloon Confusion

Maybe the attached picture will explain my problem.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 10-24-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
Re: Balloon Confusion

Hi,

Where is the attachment ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
balloon, confusion


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Information Balloon Color Anonymous MapPoint 2006/2009 Discussion 0 03-31-2005 08:00 PM
Format balloon shape johncon MapPoint 2006/2009 Discussion 1 02-16-2005 02:57 PM
Balloon Sizing and ZOrder mmichaels Wish List 1 03-18-2004 04:45 PM
Balloon data display marcus smith MapPoint 2006/2009 Discussion 1 01-17-2003 08:08 PM
balloon display Anonymous MapPoint 2006/2009 Discussion 4 01-03-2003 04:15 PM


All times are GMT -5. The time now is 04:10 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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 41 42 43 44 45 46 47 48 49 50 51 52 53 54