Esempio n. 1
0
        private void ShowRendererParamsUI(string stretchType)
        {
            if (_updateRendererUI != null)
            {
                return;
            }

            // Create a view to show map item info entry controls over the map view
            var ovBounds = new CoreGraphics.CGRect(0, 60, View.Bounds.Width, View.Bounds.Height);

            _updateRendererUI = new UpdateRendererDialogOverlay(ovBounds, 0.75f, UIColor.White, stretchType);

            // Handle the OnSearchMapsTextEntered event to get the info entered by the user
            _updateRendererUI.OnStretchInputsEntered += UpdateRenderer;

            // Handle the cancel event when the user closes the dialog without choosing to search
            _updateRendererUI.OnCanceled += (s, e) =>
            {
                // Remove the search input UI
                _updateRendererUI.Hide();
                _updateRendererUI = null;
            };

            // Add the search UI view (will display semi-transparent over the map view)
            View.Add(_updateRendererUI);
        }
Esempio n. 2
0
        private void UpdateRenderer(object sender, StretchParametersEventArgs e)
        {
            // Create an array to specify the raster bands (red, green, blue).
            int[] bands = { 0, 1, 2 };

            // Create the RgbRenderer with the stretch parameters passed in, then apply it to the raster layer.
            _rasterLayer.Renderer = new RgbRenderer(e.StretchParams, bands, null, true);

            // Remove the parameter input UI.
            _updateRendererUi.Hide();
            _updateRendererUi = null;
        }