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

HELP: Add A Pushpin With Longitude And Latitude

This is a discussion on HELP: Add A Pushpin With Longitude And Latitude within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hello, I've got a real simple question for you all. I've found this code to add a pushpin based on ...

  1. #1
    Matthew is offline Junior Member White Belt
    Join Date
    Oct 2007
    Posts
    3

    HELP: Add A Pushpin With Longitude And Latitude

    Hello,

    I've got a real simple question for you all.

    I've found this code to add a pushpin based on results mappoint finds for
    the location.

    But I want to define the pins position by long & lat..........

    Currently I do this:
    Code:
    Set objPin = objMap.AddPushpin(objMap.FindResults("Nottingham, UK")(1))
      objPin.BalloonState = geoDisplayName
    But I would prefer to place a pin at 52.9 North & 1.14 West.........

    Can anyone help?


    I have 560 pins I want to add based on long & lat, I am sure there is a quicker
    way than I am describing above - any help with this would be good to,
    increase my skills and all that.....

    Thanks in advance.

    Matt

  2. #2
    Matthew is offline Junior Member White Belt
    Join Date
    Oct 2007
    Posts
    3

    Re: HELP: Add A Pushpin With Longitude And Latitude

    I managed to figure it out and hence have 560 statements like this one:

    Code:
    Set objPin = objMap.AddPushpin(objMap.GetLocation(57.15072, -2.09392, 100), "Aberdeen")
    objPin.BalloonState = geoDisplayName
    Set objPin = objMap.AddPushpin(objMap.GetLocation(51.50674526, -0.264358806, 100), "Acton")
    objPin.BalloonState = geoDisplayName
    Set objPin = objMap.AddPushpin(objMap.GetLocation(51.25046743, -0.765143238, 100), "Aldershot")
    objPin.BalloonState = geoDisplayName
    Set objPin = objMap.AddPushpin(objMap.GetLocation(52.60407141, -1.919320951, 100), "Aldridge")
    objPin.BalloonState = geoDisplayName
    This is hitting performance (obviously!!!!), so is there a way of importing
    all of the pins and having it display the names?

  3. #3
    Mattys Consulting's Avatar
    Mattys Consulting is offline Senior Member Black Belt
    Join Date
    Dec 2002
    Posts
    1,040

    Re: HELP: Add A Pushpin With Longitude And Latitude

    Hi Matthew,

    Look into the DataSet object and .ImportData in help.

    You'll want to do something like this:

    Dim DSGuests As MapPoint.DataSet

    Set DSGuests = oMap.DataSets.ImportData(DbDir & "!qryGuests", , , , geoImportAccessQuery)


    MIke Mattys

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. place a pushpin based on longitude n latitude using vba
    By chas in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-06-2006, 02:37 PM
  2. How to recover Latitude and Longitude from a pushpin
    By prynel_laurent in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-21-2006, 02:18 PM
  3. NMEA latitude/longitude and mappoint latitude/longitude
    By muurman in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 11-22-2003, 04:42 AM
  4. VB6 - Latitude and longitude of a pushpin ???
    By Vincent BENNER in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-12-2002, 06:03 AM
  5. How to get the latitude and longitude for each pushpin
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-14-2002, 11:42 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