Opened 13 years ago

Closed 4 years ago

#1868 closed task (duplicate)

DataType inconsistency in LayerDefinition

Reported by: gBecker Owned by: jng
Priority: high Milestone: Maestro-5.1
Component: General Version: 2.1.0
Severity: major Keywords:
Cc: External ID:

Description

There is a datatype inconsistency in LayerDefinition-x.x.x.designer.cs (all versions) between InsertionPointX and InsertionPointY.

InsertionPointX returns a string but InsertionPointY returns a double. What is the correct datatype. MaestroAPI 2.x return both as a string.

  [System.ComponentModel.DefaultValueAttribute("0.5")]
  public string InsertionPointX {
      get {
          return this.insertionPointXField;
      }
      set {
          if ((this.insertionPointXField != null)) {
              if ((insertionPointXField.Equals(value) != true)) {
                  this.insertionPointXField = value;
                  this.OnPropertyChanged("InsertionPointX");
              }
          }
          else {
              this.insertionPointXField = value;
              this.OnPropertyChanged("InsertionPointX");
          }
      }
  }
        
  [System.ComponentModel.DefaultValueAttribute(0.5)]
  public double InsertionPointY {
      get {
          return this.insertionPointYField;
      }
      set {
          if ((insertionPointYField.Equals(value) != true)) {
              this.insertionPointYField = value;
              this.OnPropertyChanged("InsertionPointY");
          }
      }
  }

Change History (6)

comment:1 by jng, 13 years ago

The LayerDefinition schema messed up the original data type (see #985).

As a result, the generated code also inherits this problem.

As per the referenced ticket, the actual data type should be string.

comment:2 by gBecker, 13 years ago

Does this mean that we have to live with that as long as the schema is fixed?

comment:3 by jng, 13 years ago

For all schemas in production (1.0.0 to 2.3.0) yes. This "defect" is set in stone and cannot realistically be fixed.

Actually, the generated code returns double, but the interface that it implements (ISymbol) properly returns string for both InsertionPointX and InsertionPointY.

Since use of such types should always be done through its interfaces. The behaviour is as intended. The only problem will be if you try to use an FDO expression for InsertionPointY. Only then will the code actually need to be updated. Otherwise nothing needs to be done. Frankly, I wouldn't try to change anything here unless you have a need to use FDO expressions for InsertionPointY

comment:4 by jng, 13 years ago

Owner: set to jng

comment:5 by jng, 13 years ago

Milestone: Maestro-4.0Maestro-4.1

comment:6 by jng, 4 years ago

Resolution: duplicate
Status: newclosed

Now that Layer Definition v4.0.0 schema addresses the underlying issue, this particular issue will be addressed with the completion of: https://github.com/jumpinjackie/mapguide-maestro/issues/89

Note: See TracTickets for help on using tickets.