Add assert messages for all assertions up until ol.renderer.vector.

This commit is contained in:
Bart van den Eijnden
2015-03-30 16:41:32 +02:00
parent fb9ba22c30
commit 47ce127a10
74 changed files with 1173 additions and 682 deletions

View File

@@ -311,7 +311,8 @@ ol.interaction.Select.getDefaultStyleFunction = function() {
ol.interaction.Select.prototype.addFeature_ = function(evt) {
var feature = evt.element;
var map = this.getMap();
goog.asserts.assertInstanceof(feature, ol.Feature);
goog.asserts.assertInstanceof(feature, ol.Feature,
'feature should be an ol.Feature');
if (!goog.isNull(map)) {
map.skipFeature(feature);
}
@@ -325,7 +326,8 @@ ol.interaction.Select.prototype.addFeature_ = function(evt) {
ol.interaction.Select.prototype.removeFeature_ = function(evt) {
var feature = evt.element;
var map = this.getMap();
goog.asserts.assertInstanceof(feature, ol.Feature);
goog.asserts.assertInstanceof(feature, ol.Feature,
'feature should be an ol.Feature');
if (!goog.isNull(map)) {
map.unskipFeature(feature);
}