git-svn-id: http://svn.openlayers.org/trunk/openlayers@10663 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -151,7 +151,9 @@ OpenLayers.Format.WKT = OpenLayers.Class(OpenLayers.Format, {
|
||||
'multipoint': function(multipoint) {
|
||||
var array = [];
|
||||
for(var i=0, len=multipoint.components.length; i<len; ++i) {
|
||||
array.push(this.extract.point.apply(this, [multipoint.components[i]]));
|
||||
array.push('(' +
|
||||
this.extract.point.apply(this, [multipoint.components[i]]) +
|
||||
')');
|
||||
}
|
||||
return array.join(',');
|
||||
},
|
||||
@@ -244,10 +246,12 @@ OpenLayers.Format.WKT = OpenLayers.Class(OpenLayers.Format, {
|
||||
* @private
|
||||
*/
|
||||
'multipoint': function(str) {
|
||||
var points = OpenLayers.String.trim(str).split(',');
|
||||
var point;
|
||||
var points = OpenLayers.String.trim(str).split(this.regExes.parenComma);
|
||||
var components = [];
|
||||
for(var i=0, len=points.length; i<len; ++i) {
|
||||
components.push(this.parse.point.apply(this, [points[i]]).geometry);
|
||||
point = points[i].replace(this.regExes.trimParens, '$1');
|
||||
components.push(this.parse.point.apply(this, [point]).geometry);
|
||||
}
|
||||
return new OpenLayers.Feature.Vector(
|
||||
new OpenLayers.Geometry.MultiPoint(components)
|
||||
|
||||
Reference in New Issue
Block a user