This project has moved. For the latest updates, please go here.

OGR Provider - Get DXF file correct color

Topics: Algorithms, Data Access, Español, General Topics, SharpMap Project, SharpMap v0.9 / v1.x, Web Controls
Nov 30, 2010 at 9:52 PM

Hi everyone.

Is there any way I could get correct color on AjaxMap Control just by loading dxf files and not setting vector layer's properties manually?


Dec 1, 2010 at 7:14 AM

Hello carjona,

unfortunately SharpMap does not process the display information stored in the dgn file (or other formats via ogrprovider) at all.

If you want to do it, you'd have to create a CustomTheme which GetStyleMethod(FeatureDataRow fdr) retrieves ogr-style information from the datasource and translate that to a SharpMap.Vectorstyle.

I've started doing that, but it turned out to be not trivial (for me).

Hth FObermaier

Dec 1, 2010 at 1:36 PM

Thanks for the reply FObermaier

I'll try to do what you say. If I get it done I'll post it back.

If you you get it done first, please let me know.



Dec 1, 2010 at 1:46 PM
Edited Dec 1, 2010 at 1:50 PM

to give you a head start:

is what I've done so far. It is for sharpmapv2, but it might help you to get an idea on where to find the information needed.
This is probably of interest as well:

Hth FObermaier