code: public void getSnappingSources(final GeometryArrayFunction callback) {
  		GwtCommand commandRequest = new GwtCommand(SearchByLocationRequest.COMMAND);
  		SearchByLocationRequest request = new SearchByLocationRequest();
  		request.addLayerWithFilter(layer.getServerLayerId(), layer.getServerLayerId(), layer.getFilter());
  		request.setFeatureIncludes(GeomajasConstant.FEATURE_INCLUDE_GEOMETRY);
  		request.setLocation(boundsAsGeometry());
  		request.setCrs(layer.getMapModel().getCrs());
  		request.setQueryType(SearchByLocationRequest.QUERY_INTERSECTS);
  		request.setSearchType(SearchByLocationRequest.SEARCH_ALL_LAYERS);
  		commandRequest.setCommandRequest(request);
  		GwtCommandDispatcher.getInstance().execute(commandRequest,
  				new AbstractCommandCallback<SearchByLocationResponse>() {
  
  			public void execute(SearchByLocationResponse response) {
  				if (response.getFeatureMap().size() > 0) {
  					List<Feature> features = response.getFeatureMap().values().iterator().next();
  					Geometry[] geometries = new Geometry[features.size()];
  					for (int i = 0; i < features.size(); i++) {
  						geometries[i] = features.get(i).getGeometry();
  					}
  					callback.execute(geometries);
  				}
  			}
  		});
  	}
docs: Get the geometries of all features within the map view bounds.