I have the following code in my application to render points on a WPF map control. Similar code works fine in other scenarios that I've worked with. In this instance, however, the Points are not rendering on the map regardless of the zoom level.
Any ideas?
Are there any properties related to DefaultPointStyle that control how many points in an area are rendered - similar to the GridSize or TextLineSegmentRatio properties of the DefaultTextStyle?
Thanks,
Nick
// 10.0 - Establish Map Unit System
wpfMap1.MapUnit = GeographyUnit.DecimalDegree;
// 20.0 - Change color of ocean.
wpfMap1.MapBackground.BackgroundBrush = new GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean);
// 30.0 - Create Map Layer representing the US
ShapeFileFeatureLayer usLayer = new ShapeFileFeatureLayer(@"C:\Program Files\ThinkGeo\Map Suite Desktop Evaluation Edition 3.0 (BETA)\Samples\SampleData\Data\USStates.shp");
usLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1;
usLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
// 40.0 - Create Map Layer representing Addresses as Points on the Map.
InMemoryFeatureLayer AddressPointLayer = new InMemoryFeatureLayer();
AddressPointLayer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.Capital1;
AddressPointLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
// 50.0 - Get all addresses from .CSV file
Collection<VendorWebAddress> vendorWebAddresses = GetVendorWebAddresses();
// 60.0 - 1) Attempt to Verify & Resolve addresses with GeoCode Engine data to see if it matches an existing address
// 2) If address is resolved, save & return the Latitude and Longitude points.
Collection<PointShape> vendorWebAddressPoints = GetVendorWebAddressPoints(vendorWebAddresses);
// 70.0 - Add address points (as Features) to the AddressPointLayer which will
// later be added to the Map control.
foreach (PointShape addressPoint in vendorWebAddressPoints)
{
AddressPointLayer.InternalFeatures.Add(new Feature(addressPoint));
}
// 80.0 - Add Layers to Map
wpfMap1.StaticOverlay.Layers.Add("USLayer", usLayer);
wpfMap1.StaticOverlay.Layers.Add("AddressPointLayer", AddressPointLayer);
wpfMap1.CurrentExtent = new RectangleShape(-230, 105, 30, 26);
// 90.0 - Render Map with Changes
wpfMap1.Refresh();