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

dataSet.zoomTo()

This is a discussion on dataSet.zoomTo() within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, the dataSet.zoomTo() function does'nt work, gives me an error. dataSets.zoomTo() works very well, zooming to show the symbols of ...

  1. #1
    chpw is offline Junior Member Yellow Belt
    Join Date
    Dec 2004
    Posts
    26

    dataSet.zoomTo()

    Hi,

    the dataSet.zoomTo() function does'nt work, gives me an error. dataSets.zoomTo() works very well, zooming to show the symbols of all dataSets of the active map. How to zoom to a single dataSet?

    TIA
    Chris Werner

  2. #2
    chpw is offline Junior Member Yellow Belt
    Join Date
    Dec 2004
    Posts
    26

    Wrong question, now: Add pushpins to a certain dataset?

    Hi,

    investigating my code somewhat shows that dataSet.zoomTo() works very well too - if there are at least one pushpin in the dataset. But how to add pushpins to a certain dataset? Calling map.addPushpin() always adds the pushpin to a dataset called "My Pins" but I want to organize my added pushpins into different datasets.
    Any hint?

    TIA

    Chris Werner

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

    I _think_ you can only add pushpins to the first dataset. However there are always workarounds

    Use the first dataset only as a temporary place to add your pushpins. After adding them you move them to the dataset of your choice. After the move they are automatically deleted from the primary dataset.

  4. #4
    chpw is offline Junior Member Yellow Belt
    Join Date
    Dec 2004
    Posts
    26

    Thanks!

    Thanks Wilfried,

    this is a acceptable workaround.

    Kind regards

    Chris Werner

  5. #5
    kavehmb2000 is offline Junior Member White Belt
    Join Date
    May 2006
    Posts
    3
    But how to add pushpins to a certain dataset? Calling map.addPushpin() always adds the pushpin to a dataset called "My Pins" but I want to organize my added pushpins into different datasets.
    Any hint?
    maybe this can help u:
    [C#]
    //See whether there is an existing datasetwith the same name
    object datasetName = "NorthWind Orders";
    if(map.DataSets.Count > 0 && map.DataSets.get_Item(ref datasetName) != null)
    //If so, delete it
    map.DataSets.get_Item(ref datasetName).Delete( );
    //Now create a new dataset
    MapPoint.DataSet dataset = map.DataSets.AddPushpinSet("whateverName");
    //Find location
    MapPoint.Location location = null;
    try
    {
    //Get the location
    location = XXX;// put ur location anyway yo wish(lon/lat or // address)
    //Create a pushpin
    if(location != null)
    {
    MapPoint.Pushpin pushpin =
    map.AddPushpin(location, companyname);
    //Assign the contact name
    pushpin.Note = "Contact : " + customername;
    //Move to the pushpin dataset
    pushpin.MoveTo(dataset);

    }
    }
    catch
    {
    //Do some logging
    }
    i hope this can be a hint to the solution
    KMB

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Dataset rendering
    By Gianmaria in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 06-09-2005, 02:22 PM
  2. How do you add records to a dataset
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-03-2005, 03:09 PM
  3. ZoomTo Cropping
    By JRussell in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 10-27-2003, 10:47 AM
  4. Another Question much simpler (zoomto stuff)
    By Dazzer in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-24-2003, 05:18 PM
  5. If I have one dataset with 300 pushpins, how do i ....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 02-26-2002, 12:52 PM

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