if (null == mapBounds) {
throw new GeomajasException(ExceptionCode.PARAMETER_MISSING, "mapBounds");
}
Coordinate coordinate = new Coordinate(requestLocation.getX(), requestLocation.getY());
Crs crs = geoService.getCrs2(request.getCrs());
boolean searchFirstLayerOnly;
switch (request.getSearchType()) {
case SearchByPointRequest.SEARCH_FIRST_LAYER:
searchFirstLayerOnly = true;
break;
case SearchByPointRequest.SEARCH_ALL_LAYERS:
searchFirstLayerOnly = false;
break;
default:
throw new IllegalArgumentException("Invalid value for searchType");
}
log.debug("search by location {}", coordinate);
if (layerIds.length > 0) {
for (String layerId : layerIds) {
if (securityContext.isLayerVisible(layerId)) {
Layer<?> layer = configurationService.getLayer(layerId);
if (layer instanceof LayerFeatureInfoSupport &&
((LayerFeatureInfoSupport) layer).isEnableFeatureInfoSupport()) {
Crs layerCrs = layerService.getCrs(layer);
double layerScale = calculateLayerScale(crs, layerCrs, mapBounds, request.getScale());
Coordinate layerCoordinate = geoService.transform(coordinate, crs, layerCrs);
List<Feature> features = ((LayerFeatureInfoSupport) layer).getFeaturesByLocation(
layerCoordinate, layerScale, request.getPixelTolerance());
if (features != null && features.size() > 0) {