Package org.geomajas.command.dto

Examples of org.geomajas.command.dto.SearchByLocationRequest


  public void search(String crs, final Layer<?> layer, Geometry location, double buffer,
      final FeatureCallback callback) {
    if (layer instanceof FeaturesSupported) {
      FeaturesSupported fs = (FeaturesSupported) layer;
      SearchByLocationRequest request = new SearchByLocationRequest();
      request.setBuffer(buffer);
      request.setLayerIds(new String[] { layer.getServerLayerId() });
      request.setFilter(layer.getId(), fs.getFilter());
      request.setLocation(geometryConverter.toDto(location));
      request.setSearchType(SearchType.SEARCH_ALL_LAYERS.getValue());
      request.setCrs(crs);
      request.setFeatureIncludes(11);

      Command command = new Command(SearchByLocationRequest.COMMAND);
      command.setCommandRequest(request);
      commandService.execute(command, new CommandCallback() {
View Full Code Here


    }
  }

  public void search(String crs, final List<Layer<?>> layers, Geometry location, double buffer, QueryType queryType,
      SearchType searchType, float ratio, final FeatureCallback callback) {
    SearchByLocationRequest request = new SearchByLocationRequest();
    String[] layerIds = new String[layers.size()];
    for (int i = 0; i < layers.size(); i++) {
      Layer<?> layer = layers.get(i);
      layerIds[i] = layer.getServerLayerId();
      if (layer instanceof FeaturesSupported) {
        request.setFilter(layer.getId(), ((FeaturesSupported) layer).getFilter());
      }
    }

    request.setBuffer(buffer);
    request.setLayerIds(layerIds);
    request.setLocation(geometryConverter.toDto(location));
    request.setQueryType(queryType.getValue());
    request.setSearchType(searchType.getValue());
    request.setRatio(ratio);
    request.setCrs(crs);
    request.setFeatureIncludes(11);

    Command command = new Command(SearchByLocationRequest.COMMAND);
    command.setCommandRequest(request);
    commandService.execute(command, new CommandCallback() {
View Full Code Here

TOP

Related Classes of org.geomajas.command.dto.SearchByLocationRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.