Shape Type

Topics: General Topics
Sep 14, 2006 at 10:03 AM


I have different vector layers that can be loaded in any order and i need to find the Geometry shape of each vector layer to apply proper styles.

I am reading from the shape file as shown below.
------------------------------------------------

MapLayer(cnt) = New SharpMap.Layers.VectorLayer(layer_name)

MapLayer(cnt).DataSource = New SharpMap.Data.Providers.ShapeFile(Server.MapPath(map_loc), True)

-------------------------------------------------

can someone please tell me after loading the shape file how to find if the loaded layer is of the Geometry type point, polygon, etc.


It would be a great help to me.

Regards,
Vijaysudh
Developer
Sep 14, 2006 at 7:52 PM
Use the ShapeType property:
(MapLayer(cnt).DataSource as SharpMap.Data.Providers.ShapeFile).ShapeType