Add support for reading id & properties
This commit is contained in:
@@ -9,6 +9,9 @@ var aruba = {
|
||||
objects: {
|
||||
aruba: {
|
||||
type: 'Polygon',
|
||||
properties: {
|
||||
prop0: 'value0'
|
||||
},
|
||||
arcs: [[0]],
|
||||
id: 533
|
||||
}
|
||||
@@ -46,6 +49,11 @@ describe('ol.format.TopoJSON', function() {
|
||||
var geometry = feature.getGeometry();
|
||||
expect(geometry).to.be.a(ol.geom.Polygon);
|
||||
|
||||
// Parses identifier
|
||||
expect(feature.getId()).to.be(533);
|
||||
// Parses properties
|
||||
expect(feature.get('prop0')).to.be('value0');
|
||||
|
||||
expect(geometry.getExtent()).to.eql([
|
||||
-70.08100810081008, 12.417091709170947,
|
||||
-69.9009900990099, 12.608069195591469
|
||||
|
||||
Reference in New Issue
Block a user