コード例 #1
0
ファイル: LayerOsm.cs プロジェクト: JoeCooper/ui
        /// <summary>
        /// Creates a new OSM data layer.
        /// </summary>
        /// <param name="dataSource"></param>
        /// <param name="styleInterpreter"></param>
        /// <param name="projection"></param>
        public LayerOsm(IDataSourceReadOnly dataSource, StyleInterpreter styleInterpreter, IProjection projection)
        {
            // build the zoom-level cutoffs.
            List<float> zoomFactors = new List<float>();
            zoomFactors.Add(16);
            zoomFactors.Add(14);
            zoomFactors.Add(12);
            zoomFactors.Add(10);

            _dataSource = dataSource;
            _styleSceneManager = new StyleSceneManager(styleInterpreter, projection, zoomFactors);
        }
コード例 #2
0
ファイル: LayerOsm.cs プロジェクト: robert-hickey/OsmSharp
        /// <summary>
        /// Creates a new OSM data layer.
        /// </summary>
        /// <param name="dataSource"></param>
        /// <param name="styleInterpreter"></param>
        public LayerOsm(IDataSourceReadOnly dataSource, StyleInterpreter styleInterpreter, IProjection projection)
        {
            // build the zoom-level cutoffs.
            List<float> zoomLevelCutoffs = new List<float>();
            zoomLevelCutoffs.Add((float)projection.ToZoomFactor(18));
            //zoomLevelCutoffs.Add((float)projection.ToZoomFactor(16));
            //zoomLevelCutoffs.Add((float)projection.ToZoomFactor(14));
            //zoomLevelCutoffs.Add((float)projection.ToZoomFactor(12));
            //zoomLevelCutoffs.Add((float)projection.ToZoomFactor(10));
            //zoomLevelCutoffs.Add((float)projection.ToZoomFactor(8));
            zoomLevelCutoffs.Add((float)projection.ToZoomFactor(0));

            _dataSource = dataSource;
            _styleSceneManager = new StyleSceneManager(styleInterpreter, zoomLevelCutoffs);
            //_styleSceneManager = new StyleSceneManager(styleInterpreter);
        }