now i connect mssql by OledbPointFeatureSource query show point that OK. but i develop program next step to draw thematic by get values from mssql ??
OledbPointFeatureSource draw Thematic?
Hi Thanom,
It looks you can read point by OledPointFeatureSource query now, and you want to get value for next step?
Sorry I haven’t understood your problem, could you please describe your scenario more detail?
Regards,
Don
hi
from Draw Thematic Features sample code. i can Draw Thematic by read data from mssql (count case by group same area) overlay other layer?? but mssql no have .shp(not covert .shp to mssql)
1. layer point
2. layer Thematic (group from layer point)
thank you
Hi Thanom,
Thanks for your further information, may I make a confirmation with you? do you want to get the points from mssql, then draw these points thematicly? if yes, following code is for your consideration
string connectionString = "…";
OledbPointFeatureLayer citiesLayer = new OledbPointFeatureLayer(Parameters, connectionString);
ClassBreakStyle style = new ClassBreakStyle("ID");
style.ClassBreaks.Add(new ClassBreak(double.MinValue, PointStyles.CreateSimpleCircleStyle(GeoColor.SimpleColors.Green, 4)));
style.ClassBreaks.Add(new ClassBreak(350, PointStyles.CreateSimpleCircleStyle(GeoColor.SimpleColors.Orange, 6)));
style.ClassBreaks.Add(new ClassBreak(400, PointStyles.CreateSimpleCircleStyle(GeoColor.SimpleColors.Red, 8)));
citiesLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(style);
citiesLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
Best Regards
Summer
hi
if i change data by convert .shp to mssql and show on web. how to show??
thank you
Hi dacha,
If I misunderstood you, please feel free to correct me, I guess to show a mssql with ClassBreakStyle is same to the OleDB, just minor thing is changing the OledbPointFeatureLayer to MSSQL2008FeatureLayer.
string
connectionString =
"…"
;
MSSQL2008FeatureLayer citiesLayer =
new
MSSQL2008FeatureLayer(connectionString);
ClassBreakStyle style =
new
ClassBreakStyle(
"ID"
);
style.ClassBreaks.Add(
new
ClassBreak(
double
.MinValue, PointStyles.CreateSimpleCircleStyle(GeoColor.SimpleColors.Green, 4)));
style.ClassBreaks.Add(
new
ClassBreak(350, PointStyles.CreateSimpleCircleStyle(GeoColor.SimpleColors.Orange, 6)));
style.ClassBreaks.Add(
new
ClassBreak(400, PointStyles.CreateSimpleCircleStyle(GeoColor.SimpleColors.Red, 8)));
citiesLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(style);
citiesLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
LayerOverlay overlay =
new
LayerOverlay();
overlay.Layers.Add(citiesLayer);
Thanks,
Johnny