public void setQuality( String layer, Quality q ) { if ( options.get( layer ) == null ) { options.put( layer, new MapOptions( q, null, null, -1, -1 ) ); } else { options.get( layer ).setQuality( q ); } }
public void setMaxFeatures( String layer, int maxFeatures ) { if ( options.get( layer ) == null ) { options.put( layer, new MapOptions( null, null, null, maxFeatures, -1 ) ); } else { options.get( layer ).setMaxFeatures( maxFeatures ); } }
public void setFeatureInfoRadius( String layer, int radius ) { if ( options.get( layer ) == null ) { options.put( layer, new MapOptions( null, null, null, -1, radius ) ); } else { options.get( layer ).setFeatureInfoRadius( radius ); } }
public void setInterpolation( String layer, Interpolation interpol ) { if ( options.get( layer ) == null ) { options.put( layer, new MapOptions( null, interpol, null, -1, -1 ) ); } else { options.get( layer ).setInterpolation( interpol ); } }
public void setAntialias( String layer, Antialias alias ) { if ( options.get( layer ) == null ) { options.put( layer, new MapOptions( null, null, alias, -1, -1 ) ); } else { options.get( layer ).setAntialias( alias ); } }
public MapOptionsMaps( Map<String, Quality> qualities, Map<String, Interpolation> interpolations, Map<String, Antialias> antialiases, Map<String, Integer> maxFeatures ) { options = new HashMap<String, MapOptions>(); for ( Entry<String, Quality> e : qualities.entrySet() ) { options.put( e.getKey(), new MapOptions( e.getValue(), null, null, -1, -1 ) ); } for ( Entry<String, Interpolation> e : interpolations.entrySet() ) { if ( options.get( e.getKey() ) != null ) { options.get( e.getKey() ).setInterpolation( e.getValue() ); } else { options.put( e.getKey(), new MapOptions( null, e.getValue(), null, -1, -1 ) ); } } for ( Entry<String, Antialias> e : antialiases.entrySet() ) { if ( options.get( e.getKey() ) != null ) { options.get( e.getKey() ).setAntialias( e.getValue() ); } else { options.put( e.getKey(), new MapOptions( null, null, e.getValue(), -1, -1 ) ); } } for ( Entry<String, Integer> e : maxFeatures.entrySet() ) { setMaxFeatures( e.getKey(), e.getValue() ); } }
/** * @param queryable * the queryable to set */ public void setQueryable( boolean queryable ) { if ( mapOptions != null ) { if ( queryable ) { if ( mapOptions.getFeatureInfoRadius() < 1 ) { mapOptions.setFeatureInfoRadius( 1 ); } } else { if ( mapOptions.getFeatureInfoRadius() > 0 ) { mapOptions.setFeatureInfoRadius( 0 ); } } } else if ( queryable ) { mapOptions = new MapOptions( null, null, null, -1, 1 ); } else { mapOptions = new MapOptions( null, null, null, -1, 0 ); } }
public MapOptions get( String layer ) { return new MapOptions( getQuality( layer ), getInterpolation( layer ), getAntialias( layer ), getMaxFeatures( layer ), getFeatureInfoRadius( layer ) ); }
MapOptions buildMapOptions() { int maxFeatures = 10000; int featureInfoRadius = 1; if ( conf != null ) { LayerOptionsType sf = conf.getDefaultLayerOptions(); alias = handleDefaultValue( sf == null ? null : sf.getAntiAliasing(), Antialias.class, BOTH ); quali = handleDefaultValue( sf == null ? null : sf.getRenderingQuality(), Quality.class, NORMAL ); interpol = handleDefaultValue( sf == null ? null : sf.getInterpolation(), Interpolation.class, NEARESTNEIGHBOR ); if ( sf != null && sf.getMaxFeatures() != null ) { maxFeatures = sf.getMaxFeatures(); LOG.debug( "Using global max features setting of {}.", maxFeatures ); } else { LOG.debug( "Using default global max features setting of {}, set it to -1 if you don't want a limit.", maxFeatures ); } if ( sf != null && sf.getFeatureInfoRadius() != null ) { featureInfoRadius = sf.getFeatureInfoRadius(); LOG.debug( "Using global feature info radius setting of {}.", featureInfoRadius ); } else { LOG.debug( "Using default feature info radius of {}.", featureInfoRadius ); } return new MapOptions( quali, interpol, alias, maxFeatures, featureInfoRadius ); } return null; }
private void adjustMapOptions( LayerMetadata themeMetadata, int queryable, boolean opaque, int cascaded ) { if ( themeMetadata.getMapOptions() == null ) { themeMetadata.setMapOptions( new MapOptions( null, null, null, -1, -1 ) ); } if ( queryable == QUERYABLE_DISABLED_MASK ) { themeMetadata.getMapOptions().setFeatureInfoRadius( 0 ); } else { themeMetadata.getMapOptions().setFeatureInfoRadius( -1 ); } themeMetadata.getMapOptions().setOpaque( opaque ); themeMetadata.setCascaded( cascaded ); }
opaque = cfg.isOpaque(); return new MapOptions( quali, interpol, alias, maxFeats, rad, opaque );