Hi,
I am trying to apply a value style to an sqlitefeaturelayer with the following code. But, when I view the map, nothing is displayed. If I change it to use the default zooms, it looks fine.
My Flag column contains 1 and 0 for True and False. In v10, setting the value item to “False” or “True” worked just fine. I am wondering if that is an issue now?
Also, I am a bit confused about the deprecation message that appears for MapView.ZoomLevelSet. Can you tell me how that part of the code should be written?
SqliteFeatureLayer sql = new SqliteFeatureLayer(_microConn, "Shots", "Id", "geometry");
sql.Name = "Source Points";
ZoomLevelSet zooms = new ZoomLevelSet();
ValueStyle vs = new ValueStyle();
vs.ColumnName = "Flag";
vs.ValueItems.Add(new ValueItem("False", new PointStyle(PointSymbolType.Diamond, 8, new GeoSolidBrush(GeoColors.Red))));
vs.ValueItems.Add(new ValueItem("True", new PointStyle(PointSymbolType.Diamond, 8, new GeoSolidBrush(GeoColors.Red))));
foreach (var zoom in _map.ZoomLevelSet.GetScales())
{
ZoomLevel thisZoom = new ZoomLevel(zoom);
zooms.CustomZoomLevels.Add(thisZoom);
}
// The Value Style will not display on screen
//sql.ZoomLevelSet = zooms;
Thanks,
Damian