ThinkGeo.com    |     Documentation    |     Premium Support

Adding features on shapefile based on the filed on DBF

Hello,
we want add feature on the layer based on the field of DB field on a particular zoom level.suppose say we have airport shapefile and we have field on the DBF as SIZE =“S”,“L”.“M”
and we want to display airports on the map based on zoom level
zoom level 1 to 10 will display “S” SIZE airport
zoom level 11 to 14 will display “M” SIZE airport
zoom level 11 to 14 will display “L” SIZE airport
can you provide us with the sample code for the following.
Thanks and Regards,
Hrishikesh Konde.

Hi Hrishikesh,

You just need to set different value style to different zoomlevels.

layer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(valueStyle1);
layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level10;
layer.ZoomLevelSet.ZoomLevel11.CustomStyles.Add(valueStyle2);
layer.ZoomLevelSet.ZoomLevel11.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level14;

Regards,

Ethan