Mapscript Csharp dll

Tamas Szekeres szekeres.tamas at FREEMAIL.HU
Fri Feb 17 15:10:43 PST 2006


Hi,


1. Make sure that all of the dll-s (eg. mapscript.dll, libmap.dll, bgd.dll,
libpq.dll, proj.dll ...) required by mapscript resides in your application
directory.

2. Test your binaries and mapfile using CGI mapserver, and copy the
drawmap.exe into the same directory where mapserv resides, and test it.

2. Try to compile mapserver + mapscript and test with the compiled binaries

...

I've tested this application with VS6, VS7.1, VS8 and worked.

(Note: For VS8 a proper manifest file might be created for the application
containing the reference to the Microsoft.VC80.CRT libraries)

Tamas


On Thu, 16 Feb 2006 17:49:44 -0500, Shaik A. Hussain
<shussain at ATSINCORP.COM> wrote:

>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
>
>
>
>



More information about the MapServer-users mailing list