Moving SRSReferenceGroup parser from Base to v3.
This commit is contained in:
@@ -90,12 +90,20 @@ OpenLayers.Format.GML.v3 = OpenLayers.Class(OpenLayers.Format.GML.Base, {
|
||||
*/
|
||||
readers: {
|
||||
"gml": OpenLayers.Util.applyDefaults({
|
||||
"_inherit": function(node, obj, container) {
|
||||
// SRSReferenceGroup attributes
|
||||
var dim = parseInt(node.getAttribute("srsDimension"), 10) ||
|
||||
(container && container.srsDimension);
|
||||
if (dim) {
|
||||
obj.srsDimension = dim;
|
||||
}
|
||||
},
|
||||
"featureMembers": function(node, obj) {
|
||||
this.readChildNodes(node, obj);
|
||||
},
|
||||
"Curve": function(node, container) {
|
||||
var obj = {points: []};
|
||||
this.readers.gml._srsReferenceGroup.apply(this, [node, obj, container]);
|
||||
this.readers.gml._inherit.apply(this, [node, obj, container]);
|
||||
this.readChildNodes(node, obj);
|
||||
if(!container.components) {
|
||||
container.components = [];
|
||||
@@ -174,7 +182,7 @@ OpenLayers.Format.GML.v3 = OpenLayers.Class(OpenLayers.Format.GML.Base, {
|
||||
},
|
||||
"MultiCurve": function(node, container) {
|
||||
var obj = {components: []};
|
||||
this.readers.gml._srsReferenceGroup.apply(this, [node, obj, container]);
|
||||
this.readers.gml._inherit.apply(this, [node, obj, container]);
|
||||
this.readChildNodes(node, obj);
|
||||
if(obj.components.length > 0) {
|
||||
container.components = [
|
||||
@@ -187,7 +195,7 @@ OpenLayers.Format.GML.v3 = OpenLayers.Class(OpenLayers.Format.GML.Base, {
|
||||
},
|
||||
"MultiSurface": function(node, container) {
|
||||
var obj = {components: []};
|
||||
this.readers.gml._srsReferenceGroup.apply(this, [node, obj, container]);
|
||||
this.readers.gml._inherit.apply(this, [node, obj, container]);
|
||||
this.readChildNodes(node, obj);
|
||||
if(obj.components.length > 0) {
|
||||
container.components = [
|
||||
|
||||
Reference in New Issue
Block a user