예제 #1
0
        public void Render(IViewport viewport, IEnumerable <ILayer> layers)
        {
            var layerNames = new List <string> ();

            _featuresForLayer = new Dictionary <string, List <IFeature> >();

            foreach (var layer in layers)
            {
                if (layer.Enabled &&
                    layer.MinVisible <= viewport.Resolution &&
                    layer.MaxVisible >= viewport.Resolution)
                {
                    var layerName = RenderFeaturesForLayer(viewport, layer);
                    if (layerName != null)
                    {
                        layerNames.Add(layerName);
                    }
                    //renderQueue.PutLayer (layer.Name, features);
                }
            }

            foreach (var kv in _featuresForLayer)
            {
                renderQueue.PutLayer(kv.Key, kv.Value);
            }

            renderQueue.ResetQueue(layerNames);
        }