Hi,
I am trying to display image based on some status. So I have defined valuestyle as below (commented); but I could not see any image; So I modified code to atleast show some symbol, still no luck. Am I doing anything wrong here?
Map1.MapUnit = GeographyUnit.DecimalDegree;
Map1.CurrentExtent = new RectangleShape(4.41672665322312, 50.884346665835, 4.43487330827975, 50.8778708746709);
ServerLayerOverlay serverLayerOverlay = new ServerLayerOverlay("Sylvia", "SilverlightMapConnector1");
Map1.Overlays.Add(serverLayerOverlay);
// Map1.Refresh();
InMemoryFeatureLayer featureLayer = new InMemoryFeatureLayer();
ValueStyle FeatureStyle = new ValueStyle {ColumnName = "Status"};
//PointStyle okStyle = new PointStyle(new GeoImage(new Uri("/Theme/PTZOk.png", UriKind.RelativeOrAbsolute)));
//PointStyle eventStyle = new PointStyle(new GeoImage(new Uri("/Theme/PTZEvent.png", UriKind.RelativeOrAbsolute)));
//PointStyle alarmStyle = new PointStyle(new GeoImage(new Uri("/Theme/PTZAlarm.png", UriKind.RelativeOrAbsolute)));
PointStyle okStyle = new PointStyle(PointSymbolType.Square, new GeoSolidBrush(GeoColor.SimpleColors.Blue), new GeoPen(GeoColor.SimpleColors.BrightBlue), 10);
okStyle.RotationAngle = 45;
PointStyle eventStyle = new PointStyle(PointSymbolType.Square, new GeoSolidBrush(GeoColor.SimpleColors.Yellow), new GeoPen(GeoColor.SimpleColors.BrightYellow), 10);
okStyle.RotationAngle = 45;
PointStyle alarmStyle = new PointStyle(PointSymbolType.Square, new GeoSolidBrush(GeoColor.SimpleColors.Red), new GeoPen(GeoColor.SimpleColors.BrightRed), 10);
okStyle.RotationAngle = 45;
FeatureStyle.ValueItems.Add(new ValueItem("Ok", okStyle));
FeatureStyle.ValueItems.Add(new ValueItem("Event", eventStyle));
FeatureStyle.ValueItems.Add(new ValueItem("Alarm", alarmStyle));
featureLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Clear();
featureLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(FeatureStyle);
featureLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
LayerOverlay layerFeatureOverlay = new LayerOverlay();
layerFeatureOverlay.Layers.Add(featureLayer);
Map1.Overlays.Add("layerFeatureOverlay", layerFeatureOverlay);
Feature pointFeature = new Feature(new Vertex(4.42007,50.88026));
pointFeature.ColumnValues["Status"] = "Alarm";
featureLayer.InternalFeatures.Add(pointFeature.Id, pointFeature);
Map1.Overlays["layerFeatureOverlay"].Refresh();
Map1.Refresh();
-Muneswar