As with vector layers and feature overlays, feature style can be set by calling
setStyle. Calling getStyle returns what was passed to setStyle. Internally, we call getStyleFunction.
It would be nice to also test the following:
it('does not return user set property with the same name', function() {
var feature = new ol.Feature({
whatever: 'some value',
styleFunction: 'another value'
});
expect(feature.getStyleFunction()).to.be(undefined);
});
Unfortunately, in uncompiled code (or if we export `setStyleFunction`) this does not work. Same goes for user set `id` properties (this will set our internal `id_` property). See #1672.
The first set geometry is considered the default. As an added bonus, we're back to a single argument constructor. Later, we could allow a schema to be set. This would be done before setting values (calling constructor with no args).