This project has moved and is read-only. For the latest updates, please go here.

How Can I Add new a LabelLayer into a map and add some words like a,b,c,d into this layer?

Topics: General Topics, SharpMap Project, SharpMap v0.9 / v1.x, WinForms Controls
Sep 4, 2011 at 3:17 PM
Edited Sep 4, 2011 at 3:20 PM

Hi ,I'm using SharpMap in a Windows C/S item.But I have a problem very seriously that I don't how to Add new a Labellayer into a Map,And add some new words like a,b,c,d to this new layer? Because I want to use this LabelLayer to explain some part of the a old Layer which is being already.

Can you help. I'm not very well for this problem for a long time. I'm using the V0.9.

Sep 5, 2011 at 8:08 AM

For to use a LabelLayer you need a proper datasource.

For your purpose I'd suggest OleDbPoint provider or DataTablePoint provider. They both work the same, you have some x- and y-ordinate column and another column for the label.

The OleDbPoint provider can work with any oledb datasource (e.g. an excel sheet, see one of the tilelayer samples of winformsamples project), DataTablePoint provder takes a System.DataTable as source.

Hth FObermaier