Esempio n. 1
0
        /// <summary>
        /// Creates a new MapCSS interpreter from a stream.
        /// </summary>
        /// <param name="stream"></param>
        /// <param name="imageSource"></param>
        public MapCSSInterpreter(Stream stream, IMapCSSImageSource imageSource)
        {
            if (imageSource == null)
            {
                throw new ArgumentNullException("imageSource");
            }

            _mapCSSFile          = MapCSSFile.FromStream(stream);
            _mapCSSImageSource   = imageSource;
            _geometryInterpreter = GeometryInterpreter.DefaultInterpreter;
        }
Esempio n. 2
0
        /// <summary>
        /// Creates a new MapCSS interpreter.
        /// </summary>
        /// <param name="mapCSSFile"></param>
        /// <param name="imageSource"></param>
        public MapCSSInterpreter(MapCSSFile mapCSSFile, IMapCSSImageSource imageSource)
        {
            if (imageSource == null)
            {
                throw new ArgumentNullException("imageSource");
            }

            _mapCSSFile          = mapCSSFile;
            _mapCSSImageSource   = imageSource;
            _geometryInterpreter = GeometryInterpreter.DefaultInterpreter;
        }
Esempio n. 3
0
        /// <summary>
        /// Creates a new MapCSS interpreter from a string.
        /// </summary>
        /// <param name="css"></param>
        /// <param name="imageSource"></param>
        /// <param name="geometryInterpreter"></param>
        public MapCSSInterpreter(string css, IMapCSSImageSource imageSource, GeometryInterpreter geometryInterpreter)
        {
            if (imageSource == null)
            {
                throw new ArgumentNullException("imageSource");
            }
            if (geometryInterpreter == null)
            {
                throw new ArgumentNullException("geometryInterpreter");
            }

            _mapCSSFile          = MapCSSFile.FromString(css);
            _mapCSSImageSource   = imageSource;
            _geometryInterpreter = geometryInterpreter;
        }
Esempio n. 4
0
        /// <summary>
        /// Creates a new MapCSS interpreter.
        /// </summary>
        /// <param name="mapCSSFile"></param>
        /// <param name="imageSource"></param>
        /// <param name="geometryInterpreter"></param>
        public MapCSSInterpreter(MapCSSFile mapCSSFile, IMapCSSImageSource imageSource, GeometryInterpreter geometryInterpreter)
        {
            if (imageSource == null)
            {
                throw new ArgumentNullException("imageSource");
            }
            if (geometryInterpreter == null)
            {
                throw new ArgumentNullException("geometryInterpreter");
            }

            _mapCSSFile          = mapCSSFile;
            _mapCSSImageSource   = imageSource;
            _geometryInterpreter = geometryInterpreter;
        }