private String buildMapClickMessage(LatLng latLng, double zoom, BoundingBox boundingBox, double tolerance, Projection projection) {
        String message = null;

        // Verify the features are indexed and we are getting information
        if (isIndexed() && (maxFeaturesInfo || featuresInfo)) {

            if (isOnAtCurrentZoom(zoom, latLng)) {

                // Get the number of features in the tile location
                long tileFeatureCount = tileFeatureCount(latLng, zoom);

                // If more than a configured max features to draw
                if (isMoreThanMaxFeatures(tileFeatureCount)) {

                    // Build the max features message
                    if (maxFeaturesInfo) {
                        message = buildMaxFeaturesInfoMessage(tileFeatureCount);
                    }

                }
                // Else, query for the features near the click
                else if (featuresInfo) {

                    // Query for results and build the message
                    FeatureIndexResults results = queryFeatures(boundingBox, projection);
                    message = featureInfoBuilder.buildResultsInfoMessageAndClose(results, tolerance, latLng, projection);

                }

            }
        }

        return message;
    }
private String buildMapClickMessage ( LatLng latLng , double zoom , BoundingBox boundingBox , double tolerance , Projection projection ) { String message = null ; if ( isIndexed ( ) && ( maxFeaturesInfo || featuresInfo ) ) { if ( isOnAtCurrentZoom ( zoom , latLng ) ) { long tileFeatureCount = tileFeatureCount ( latLng , zoom ) ; if ( isMoreThanMaxFeatures ( tileFeatureCount ) ) { if ( maxFeaturesInfo ) { message = buildMaxFeaturesInfoMessage ( tileFeatureCount ) ; } } else if ( featuresInfo ) { FeatureIndexResults results = queryFeatures ( boundingBox , projection ) ; message = featureInfoBuilder . buildResultsInfoMessageAndClose ( results , tolerance , latLng , projection ) ; } } } return message ; }
Perform a query based upon the map click location and build a info message

@param latLng      location
@param zoom        current zoom level
@param boundingBox click bounding box
@param tolerance   tolerance distance
@param projection  desired geometry projection
@return information message on what was clicked, or null