src/data/DataProvider.js
function(bbox) {
        var coords = this._toIndexKey(bbox);
        var array = this._rtree.search(coords);
        array = this._sortByDistance(array, bbox);
        var result = [];
        var filterMultiPoints = !!this.options.filterPoints;
        for (var i = 0; i < array.length; i++) {
            var arr = array[i];
            var r = arr.data;
            var geometry = this.getGeometry(r);
            var handled = false;
            GeoJsonUtils.forEachGeometry(geometry, {
                onPoints : function(points) {
                    if (!handled
                            && (!filterMultiPoints || GeometryUtils
                                    .bboxContainsPoints(points, bbox))) {
                        result.push(r);
                        handled = true;
                    }
                },
                onLines : function(lines) {
                    if (!handled
                            && GeometryUtils.bboxIntersectsLines(lines, bbox)) {
                        result.push(r);
                        handled = true;
                    }
                },
                onPolygons : function(polygons) {
                    if (!handled
                            && GeometryUtils.bboxIntersectsPolygonsWithHoles(
                                    polygons, bbox)) {
                        result.push(r);
                        handled = true;
                    }
                }
            });
        }
        return result;
    }
function(bbox) {
        var coords = this._toIndexKey(bbox);
        var array = this._rtree.search(coords);
        array = this._sortByDistance(array, bbox);
        var result = [];
        var filterMultiPoints = !!this.options.filterPoints;
        for (var i = 0; i < array.length; i++) {
            var arr = array[i];
            var r = arr.data;
            var geometry = this.getGeometry(r);
            var handled = false;
            GeoJsonUtils.forEachGeometry(geometry, {
                onPoints : function(points) {
                    if (!handled
                            && (!filterMultiPoints || GeometryUtils
                                    .bboxContainsPoints(points, bbox))) {
                        result.push(r);
                        handled = true;
                    }
                },
                onLines : function(lines) {
                    if (!handled
                            && GeometryUtils.bboxIntersectsLines(lines, bbox)) {
                        result.push(r);
                        handled = true;
                    }
                },
                onPolygons : function(polygons) {
                    if (!handled
                            && GeometryUtils.bboxIntersectsPolygonsWithHoles(
                                    polygons, bbox)) {
                        result.push(r);
                        handled = true;
                    }
                }
            });
        }
        return result;
    }
function ( bbox ) { var coords = this . _toIndexKey ( bbox ) ; var array = this . _rtree . search ( coords ) ; array = this . _sortByDistance ( array , bbox ) ; var result = [ ] ; var filterMultiPoints = ! ! this . options . filterPoints ; for ( var i = 0 ; i < array . length ; i ++ ) { var arr = array [ i ] ; var r = arr . data ; var geometry = this . getGeometry ( r ) ; var handled = false ; GeoJsonUtils . forEachGeometry ( geometry , { onPoints : function ( points ) { if ( ! handled && ( ! filterMultiPoints || GeometryUtils . bboxContainsPoints ( points , bbox ) ) ) { result . push ( r ) ; handled = true ; } } , onLines : function ( lines ) { if ( ! handled && GeometryUtils . bboxIntersectsLines ( lines , bbox ) ) { result . push ( r ) ; handled = true ; } } , onPolygons : function ( polygons ) { if ( ! handled && GeometryUtils . bboxIntersectsPolygonsWithHoles ( polygons , bbox ) ) { result . push ( r ) ; handled = true ; } } } ) ; } return result ; }
Searches resources in the specified bounding box.
Searches resources in the specified bounding box .