Skip to content

Instantly share code, notes, and snippets.

@bartvde
Created June 28, 2013 09:04
Show Gist options
  • Save bartvde/5883462 to your computer and use it in GitHub Desktop.
Save bartvde/5883462 to your computer and use it in GitHub Desktop.
'_spatial': function(node, obj, func) {
var args = [], container = {};
this.readChildNodes(node, container);
if (goog.isDef(container.geometry)) {
args.push(this.gml_.createGeometry(container));
} else {
args = container.bounds;
}
if (goog.isDef(container['distance'])) {
args.push(container['distance']);
}
if (goog.isDef(container['distanceUnits'])) {
args.push(container['distanceUnits']);
}
obj['filters'].push(new ol.expr.Call(func, args));
},
'BBOX': function(node, obj) {
var readers = this.readers[this.defaultNamespaceURI];
readers['_spatial'].call(this, node, obj,
ol.expr.functions.EXTENT);
},
'Intersects': function(node, obj) {
var readers = this.readers[this.defaultNamespaceURI];
readers['_spatial'].call(this, node, obj,
ol.expr.functions.INTERSECTS);
},
@bartvde
Copy link
Author

bartvde commented Jun 28, 2013

ol.expr.lib[ol.expr.functions.INTERSECTS] = function(geom) {
throw new Error('Spatial function not implemented: ' +
ol.expr.functions.INTERSECTS);
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment