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

Refresh After A Pushpin Has Been Deleted From the Dataset

This is a discussion on Refresh After A Pushpin Has Been Deleted From the Dataset within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi How can I refresh the map after a pushpin has been deleted from a dataset. I need to display ...

  1. #1
    Yazzy is offline Junior Member Yellow Belt
    Join Date
    Dec 2004
    Posts
    25

    Refresh After A Pushpin Has Been Deleted From the Dataset

    Hi

    How can I refresh the map after a pushpin has been deleted from a dataset.

    I need to display only the pushpins left in the dataset on the map.

    I have to use 'ImportData' method and also using VB6.

    Thanks in advance.

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

    You can delete it like this:

    Code:
                pp  = map.FindPushpin(ppName);
                if (pp != null)
                    pp.Delete();

  3. #3
    Yazzy is offline Junior Member Yellow Belt
    Join Date
    Dec 2004
    Posts
    25

    Refresh After A Pushpin Has Been Deleted From the Dataset

    Hi

    I can delete the pushpin but I cannot refresh the map the new map to show the left Pushpins only

    ID = "John Smith"
    Set objPin = objMap.FindPushpin(ID)

    objPin.Select
    objPin.Delete
    ?? WHAT CODE TO REDRAW NEW DATASET (after a pushpin delete) map ???


    What do I add after the last line 'objPin.Delete' to Redraw the map

    Currently the deleted pushpin still appear on the map but not in the Dataset i.e "John Smith" does not appear when the Dataset test is done (see below for the dataset test code)


    Set objDataSet = objMap.DataSets("New Set")

    Set objRecordset = objDataSet.QueryAllRecords

    Do Until objRecordset.EOF

    MsgBox objRecordset.Pushpin.Name
    objRecordset.MoveNext
    Loop



    Thanks

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

    The problem you have is probably because of the use of datasets. If you Add or Delete a PushPin it reflect immediatily on the map. So I suggest you forget DataSets (if that is the reason) and control the Pushpins yourself.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. PushPin dataset is saved in .ptm?
    By PeppeM in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-06-2006, 01:53 PM
  2. Event get called when pushpin is deleted
    By vidyakulkarni in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 10-25-2004, 10:43 PM
  3. Find Nearby Pushpin in dataset
    By Dazzer in forum Products: Pushpin Tool, Single State Mapper
    Replies: 1
    Last Post: 10-16-2003, 04:05 PM
  4. Problems with Pushpin dataset
    By Sylvain in forum MapPoint Desktop Discussion
    Replies: 13
    Last Post: 11-28-2002, 08:08 AM
  5. Is there any way to refresh just one PushPin Layer....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-27-2001, 10:29 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