Hi All,

 

I am using Mapscript Csharp dll and drawmap.cs script from Mapserver Howard Butler's kitchen sink binaries. I am getting the following error when I use the drawmap.exe through command line.

 

C:\temp\dotnet\MapserverTest\bin\Debug>drawmap  postgis.map pg.png

# Map layers 1; Map name = EARS

Layer [0] name: countyp020

 

Unhandled Exception: System.NullReferenceException: Object reference not set to

an instance of an object.

   at mapscriptPINVOKE.mapObj_draw(HandleRef jarg1)

   at mapObj.draw()

   at DrawMap.Main(String[] args) in c:\temp\dotnet\mapservertest\drawmap.cs:lin

e 63

 

 

Does any one can help me how to fix this error.

 

Here is the map file I am using

 

NAME EARS 

SIZE 90 52

STATUS ON

EXTENT -125.285 25.560 -66.536 52.656

UNITS meters

SYMBOLSET  "C:\Symbols\symbols.sym"

FONTSET  "C:\Symbols\fonts.list"

IMAGECOLOR 240 228 190

TRANSPARENT OFF

 

LAYER

  NAME "countyp020"

  TYPE Polygon

  STATUS default

  CONNECTION "user=postgres password=pwd dbname=PAMS host=localhost port=5432"

  CONNECTIONTYPE postgis

  DATA 'countyp020'

   

  CLASS      

    OUTLINECOLOR 190 190 190

    SYMBOL 'circle'

    SIZE 1

  END  # CLASS

END  # LAYER

 

END  # MAPFILE

 

 

Thanks,

Anwar

 

Reply via email to