Opened 18 years ago

Closed 18 years ago

#1807 closed defect (worksforme)

Extent of mapObj is not set after object creation

Reported by: ljfong@… Owned by: szekerest
Priority: high Milestone:
Component: MapScript-C# Version: 4.8
Severity: blocker Keywords:
Cc:

Description

When using C# MapScript to create a mapObj using the mapObj constructor from a
map file, the extent of the object are not set properly after creation.

Tracking the instantiated mapObj through the MS Visual Studio 2003 debugger
reveals that the extent attributes minx, miny, maxx, maxy still have values of 0.0.

Development environment details:
- 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 SP2 with IIS 5
- .NET Framework 1.1

The mapfile "Simple.map" is as follows.

NAME ODESSA
STATUS on 
SIZE 684 592
# xmin ymin xmax ymax
EXTENT -104.10235082418987 29.77884364609445 -101.64625194665918 32.52517088808842
UNITS DD
OUTPUTFORMAT
  NAME png
  DRIVER "GD/PNG"
  MIMETYPE "image/png"
  IMAGEMODE PC256
  EXTENSION "png"
END
IMAGETYPE png
END # Map File

VB.NET web application test program as follows.

ExtentProblem.aspx.vb:

Public Class ExtentProblem
    Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub

    'NOTE: The following placeholder declaration is required by the Web Form
Designer.
    'Do not delete or move it.
    Private designerPlaceholderDeclaration As System.Object

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here
        Dim mapLocation As String = "C:\Projects\Genesis\temp\"
        Dim p_map As mapObj = New mapObj(mapLocation & "Simple.map")
    End Sub

End Class

ExtentProblem.aspx:

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="ExtentProblem.aspx.vb" Inherits="Genesis.Experiment.ExtentProblem"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
    <title>ExtentProblem</title>
    <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
    <meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
    <meta name=vs_defaultClientScript content="JavaScript">
    <meta name=vs_targetSchema
content="http://schemas.microsoft.com/intellisense/ie5">
  </head>
  <body MS_POSITIONING="GridLayout">

    <form id="Form1" method="post" runat="server">

    </form>

  </body>
</html>

Change History (1)

comment:1 by ljfong@…, 18 years ago

Resolution: worksforme
Status: newclosed
Turned out to be DLL hell problem. Sorry for all the noise.
Note: See TracTickets for help on using tickets.