Ejemplo n.º 1
0
        /// <summary>
        /// Initialize implementation from IMapView.
        /// </summary>
        /// <param name="mapLayout"></param>
        void IMapViewSurface.Initialize(MapView mapLayout)
        {
            // create the Open GL 2D target.
            _target = new OpenGLTarget2D();
            this.SetRenderer(_target);

            _mapView = mapLayout;
            this.SetWillNotDraw(false);

            this.MapMinZoomLevel = 10;
            this.MapMaxZoomLevel = 20;

            // create the renderer.
            _renderer = new MapRenderer <OpenGLTarget2D>(
                new OpenGLRenderer2D());

            // initialize the gesture detection.
            this.SetOnTouchListener(this);
            _scaleGestureDetector = new ScaleGestureDetector(
                this.Context, this);
            _rotateGestureDetector = new RotateGestureDetector(
                this.Context, this);
            _moveGestureDetector = new MoveGestureDetector(
                this.Context, this);
            _tagGestureDetector = new TapGestureDetector(
                this.Context, this);

            _makerLayer = new LayerPrimitives(
                new WebMercator());

            _scene           = new Scene2D(new WebMercator(), 16);
            _scene.BackColor = SimpleColor.FromKnownColor(KnownColor.White).Value;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initialize this instance.
        /// </summary>
        void Initialize()
        {
            // create the Open GL 2D target.
            _target = new OpenGLTarget2D();
            this.SetRenderer(_target);

            // initialize the gesture detection.
            _gestureDetector = new GestureDetector(
                this);
            _scaleGestureDetector = new ScaleGestureDetector(
                this.Context, this);
            this.SetOnTouchListener(this);

            // create the renderer.
            _renderer = new MapRenderer <OpenGLTarget2D>(
                new OpenGLRenderer2D());

            // initialize the scene.
            _scene           = new Scene2DSimple();
            _scene.BackColor = SimpleColor.FromKnownColor(KnownColor.White).Value;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initialize implementation from IMapView.
        /// </summary>
        /// <param name="mapLayout"></param>
        void IMapViewSurface.Initialize(MapView mapLayout)
        {
            // create the Open GL 2D target.
            _target = new OpenGLTarget2D();
            this.SetRenderer(_target);

            _mapView = mapLayout;
            this.SetWillNotDraw(false);

            this.MapMinZoomLevel = 10;
            this.MapMaxZoomLevel = 20;

            // create the renderer.
            _renderer = new MapRenderer<OpenGLTarget2D>(
                    new OpenGLRenderer2D());

            // initialize the gesture detection.
            this.SetOnTouchListener(this);
            _scaleGestureDetector = new ScaleGestureDetector(
                this.Context, this);
            _rotateGestureDetector = new RotateGestureDetector(
                this.Context, this);
            _moveGestureDetector = new MoveGestureDetector(
                this.Context, this);
            _tagGestureDetector = new TapGestureDetector(
                this.Context, this);

            _makerLayer = new LayerPrimitives(
                new WebMercator());

            _scene = new Scene2D(new WebMercator(), 16);
            _scene.BackColor = SimpleColor.FromKnownColor(KnownColor.White).Value;
        }