2

Anyone know if it is possible to add territory to map using map point control in C# application? (Something like in normal MapPoint 2010 application) If so, how I can use it?

ravenik
  • 852
  • 3
  • 9
  • 26

1 Answers1

1

It looks like you need to use the Datasets collection's LinkTerritories() method.

The "dataset loading" methods (eg. to create pie charts and shaded area maps) are a bit of a hairy area in MapPoint's API. With their many parameters they are easy to get wrong and the resulting error message is less than useful - typically just "bad parameter". So be warned!

winwaed
  • 7,645
  • 6
  • 36
  • 81
  • Hi, but using LinkTerritories I have to read data from file. Is it possible to create territories (for example connected with post codes) without using any files? I would prefer to have a table with post codes and just add territoried to these post codes. – ravenik Jan 31 '11 at 15:38
  • As with other datasets (excl. Simple pushpin datasets limited to Notes and Names), I believe you are limited to either invoking the relevant Wizard, or making the underlying call that the wizard uses. Ie. You have to load from a file. – winwaed Jan 31 '11 at 18:48
  • It really works:), and do you know if I can change color of the territory in code? – ravenik Feb 01 '11 at 12:01
  • Good you've got further with particular little bit of functionality Thant I've tried. I need to experiment with it and write an article. Re. Colors (and other properties), I think you are probably stuck with the parameters to LinkTerritories. Alternatively look at the Datasets object documentation but I don't recall seeing anything there. – winwaed Feb 01 '11 at 13:34