C# MapScript - Extent of mapObj not set after object creation

Hong ljfong at SDF.LONESTAR.ORG
Thu Jun 22 14:42:22 EDT 2006


Hello,

I have experienced problem using C# MapScript where I tried to create a mapObj
using the mapObj constructor from a map file, after the object creation, the
extent are not set properly.

The mapfile "odessa.map" is as follows.

NAME ODESSA
STATUS on 
SIZE 684 592
EXTENT -104.10235082418987 29.77884364609445 -101.64625194665918 32.52517088808842
...

I used VB.NET to create the object:

Dim p_map as mapObj = new mapObj("odessa.map")

Tracking p_map through a debugger after object creation revealed that:
p_map.extent.minx, p_map.extent.miny, p_map.extent.maxx, p_map.extent.maxy
still have values of 0.0.

My development environment:
- MS Visual Studio 2003 (VB.NET)
- DLLs (mapscript_csharp.dll, mapscript.dll, etc) from MS4W PHP4 Base
  Installer v1.5.4
- MS Windows XP Pro with IIS 5
- .NET Framework 1.1

This did not happen with older version of DLLs for MapServer 4.6.

Has anyone else also used C# MapScript but with VB.NET as the programming
language?

Any help/suggestion appreciated. 

Hong



More information about the mapserver-users mailing list