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 6 of 6

cant create a Puspin-Object

This is a discussion on cant create a Puspin-Object within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hello, i am using the mappoint control of mappoint european 2004 to create an application I want to use pushpins ...

  1. #1
    OverSchranzer is offline Junior Member White Belt
    Join Date
    Mar 2005
    Posts
    5

    cant create a Puspin-Object

    Hello,

    i am using the mappoint control of mappoint european 2004 to create an application


    I want to use pushpins to show data on the map
    in some exsamples i saw code like:
    Dim myPushpins(1) As Pushpin
    myPushpins(0) = New Pushpin()
    myPushpins(0).IconDataSource = "MapPoint.Icons"
    myPushpins(0).IconName = "31"
    myPushpins(0).Label = "Start"
    But it doesnt work!
    Here is my Code

    Code:
            Dim pinCounter As Integer
            pinCounter = 0
    
            objRecordSet.MoveFirst()
    
            Dim myPushpins(pinCounter.MaxValue - 1) As MapPoint.Pushpin
            Do While Not objRecordSet.EOF
    
                myPushpins&#40;pinCounter&#41; = New MapPoint.Pushpin  '<<--- ? "New cannot be used with an Interface..." ?
    
                objRecordSet.MoveNext&#40;&#41;
                pinCounter += 1
    
            Loop
    plz help me, what sould i do?

  2. #2
    John Meyer's Avatar
    John Meyer is offline Senior Member Blue Belt
    Join Date
    Jul 2002
    Posts
    478
    What language are you programming in?

  3. #3
    OverSchranzer is offline Junior Member White Belt
    Join Date
    Mar 2005
    Posts
    5

  4. #4
    John Meyer's Avatar
    John Meyer is offline Senior Member Blue Belt
    Join Date
    Jul 2002
    Posts
    478
    Give this a try

    Code:
    Try
     Dim omap As MapPoint.Map
     Dim oloc As MapPoint.Location
     Dim opin As MapPoint.Pushpin
    
     omap = AxMappointControl1.ActiveMap 
     oloc = omap.GetLocation&#40;51.577141, 0.291178, 250&#41;
     opin = omap.AddPushpin&#40;oloc, "Pushpin1"&#41;
     opin.BalloonState = MapPoint.GeoBalloonState.geoDisplayBalloon
     opin.Location.GoTo&#40;&#41;
    
    Catch ex As Exception
      MessageBox.Show&#40;ex.Message&#41;
    End Try

  5. #5
    OverSchranzer is offline Junior Member White Belt
    Join Date
    Mar 2005
    Posts
    5
    thx
    thats the way i tried first,

    but i want to set an own icon and a Label wich shows the data on the map

    is it possible somehow?

  6. #6
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    Code:
    Symbol NewSymbol = MP.ActiveMap.Symbols.Add&#40;"c&#58;\\test.bmp"&#41;;
    PP.Symbol = NewSymbol;

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to get Lat, Lon from a Location object?
    By Van in forum MapPoint Desktop Discussion
    Replies: 7
    Last Post: 02-01-2005, 03:49 PM
  2. c# zoom to object
    By starbuck in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 12-17-2004, 05:32 PM
  3. Loading some object from the map
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 07-25-2003, 06:23 AM
  4. route object to drawing object
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-09-2003, 11:29 PM
  5. DataMap object
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 08-30-2002, 06:04 AM

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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96