Returning Territory Information

tim144
04-30-2007, 09:54 AM
Hi Guys,

I am assuming this can't be done. I have looked everywhere. If this is the case please can someone please confirm this....

Using VB6 is it possible to set up a set of territories (this can be done
through the wizard using area codes / sectors or whatever), then add a location (ie an address using lon/lat co-ordinates) and get MapPoint to return the Terriroties Name of that location (ie. whatever you have called the territory using the wizard)?

I guess the territory is part of the dataset, but how do you reference it?

Paul Larson
04-30-2007, 02:09 PM
The only way I know of to get the territory is by iterating through ObjectsFromPoint for a Location, and checking for type=geoShowByTerritory. Note that the current map Altitude will greatly affect the accuracy and availability of data returned by ObjectsFromPoint.

A more reliable alternative would be to convert your territory objects to Shapes, and then use the QueryShape method.

HTH
Paul

 
Web mp2kmag.com
mapforums.com