Пример #1
0
        /**
         * Construct an elevation model given a key for a configuration source and the source's default value.
         *
         * @param key          the key identifying the configuration property in {@link Configuration}.
         * @param defaultValue the default value of the property to use if it's not found in {@link Configuration}.
         *
         * @return a new elevation model configured according to the configuration source.
         */
        public static ElevationModel makeElevationModel(string key, string defaultValue)
        {
            if (key == null)
            {
                String msg = Logging.getMessage("nullValue.KeyIsNull");
                throw new ArgumentException(msg);
            }

            object configSource = Configuration.getStringValue(key, defaultValue);

            return((ElevationModel)BasicFactory.create(AVKey.ELEVATION_MODEL_FACTORY, configSource));
        }
Пример #2
0
 /**
  * Creates a shapefile layer described by an XML layer description. This delegates layer construction to the factory
  * class associated with the configuration key "gov.nasa.worldwind.avkey.ShapefileLayerFactory".
  *
  * @param domElement the XML element describing the layer to create. The element must contain the shapefile
  *                   location, and may contain elements specifying shapefile attribute mappings, shape attributes to
  *                   assign to created shapes, and layer properties.
  * @param parameters     any parameters to apply when creating the layer.
  *
  * @return a new layer
  */
 protected Layer createShapefileLayer(Element domElement, AVList parameters)
 {
     return((Layer)BasicFactory.create(AVKey.SHAPEFILE_LAYER_FACTORY, domElement, parameters));
 }