Add support for reading id & properties
This commit is contained in:
@@ -253,6 +253,12 @@ ol.format.TopoJSON.readFeatureFromGeometry_ = function(object, arcs,
|
||||
}
|
||||
var feature = new ol.Feature();
|
||||
feature.setGeometry(geometry);
|
||||
if (goog.isDef(object.id)) {
|
||||
feature.setId(object.id);
|
||||
}
|
||||
if (goog.isDef(object.properties)) {
|
||||
feature.setValues(object.properties);
|
||||
}
|
||||
return feature;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user