MapPoint Forums

MapForums

Community of MapPoint and Bing Maps Users and Developers




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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint Desktop Discussion

Today's Posts Twitter Feed Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-10-2006
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
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 03-10-2006
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
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 03-14-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Location: Belgium
Posts: 2,323
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.
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 03-16-2006
Junior Member
Yellow Belt
 
Join Date: Dec 2004
Posts: 26
Thanks!

Thanks Wilfried,

this is a acceptable workaround.

Kind regards

Chris Werner
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 05-17-2006
Junior Member
White Belt
 
Join Date: May 2006
Posts: 3
Send a message via Yahoo to kavehmb2000
Quote:
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
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
datasetzoomto


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


All times are GMT -5. The time now is 07:34 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
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 55 56 57 58 59 60 61 62 63 64 65 66 67