Opened 13 years ago
Closed 5 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 , 13 years ago
comment:2 by , 13 years ago
Does this mean that we have to live with that as long as the schema is fixed?
comment:3 by , 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 , 13 years ago
Owner: | set to |
---|
comment:5 by , 13 years ago
Milestone: | Maestro-4.0 → Maestro-4.1 |
---|
comment:6 by , 5 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
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
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.