View Single Post

  #5 (permalink)  
Old 05-12-2005
Roman Pfarrhofer Roman Pfarrhofer is offline
Junior Member
White Belt
 
Join Date: May 2005
Posts: 1
Re: Two Possibilities...

Quote:
Originally Posted by PGLRepDev
1. No one has an answer.
2. No one (statistcally speaking) develops in this monster, so no one has an answer.
Hi kdulaney!

I've faced the same problem yesterday and today for many hours: The last hint I needed, I've found in this article: http://support.microsoft.com/default...b;EN-US;305200

Well, a long hardly commented peace of source, but it helped!

For everyone who has the same problems here my peace of code that is working. I'm loading my data from a small Excel-Sheet and display the column "Inquiries" as SizedCircles on the map.

Code:
object[,] dataArray = { {1, GeoFieldType.geoFieldName}, {
                          2, GeoFieldType.geoFieldInformation}, {
                          3, GeoFieldType.geoFieldLatitude}, {
                          4, GeoFieldType.geoFieldLongitude}, {
                          5, GeoFieldType.geoFieldData}
                        };
MapPoint.DataSet dataSet = map.DataSets.ImportData(
  "C:\\temp\\Example.xls!Sheet1"
  , dataArray
  , MapPoint.GeoCountry.geoCountryMultiCountry
  , MapPoint.GeoDelimiter.geoDelimiterDefault
  , MapPoint.GeoImportFlags.geoImportExcelSheet
  );

object key = "inquiries";
Field field = dataSet.Fields.get_Item(ref key);
if(field != null) {
  object missing = System.Reflection.Missing.Value;
  DataMap dataMap = dataSet.DisplayDataMap(
    GeoDataMapType.geoDataMapTypeSizedCircle // DataMapType
    , field // DataField
    , GeoShowDataBy.geoShowByLatLong // ShowDataBy
    , GeoCombineDataBy.geoCombineByNone // CombineDataBy
    , GeoDataRangeType.geoRangeTypeDiscreteEqualRanges // DataRangeType
    , GeoDataRangeOrder.geoRangeOrderHighToLow // DataRangeOrder
    , 8 // ColorScheme
    , 6 // DataRangeCount
    , missing // ArrayOfCustomValues
    , missing // ArrayOfCustomNames
    , missing // DivideByField
    , missing // ArrayOfDataFieldLabels
    , missing // ArrayOfPushpinSymbols
    );

  if(dataMap != null) {
    dataMap.LegendTitle = "some title";
  }
}
Example.xls!Sheet1 has following columns:
Name Description Lat Long Inquiries

Let me know if this was useful to anyone.

CU Roman
Reply With Quote