Пример #1
0
        public void showFocusMap(int position)
        {
            //mapImage.ZoomTo(0,Configuration.getWidth(320),Configuration.getWidth(320));
            mapImage.SetImageBitmap(currentMap);
            var posXY = _positionCurrentPlaces [position];

            //mapImage.PivotX = posXY.Item1;
            //mapImage.PivotY = posXY.Item2;
            //mapImage.ScaleX = 3;
            //mapImage.ScaleY = 3;
            //int x =  950*posXY.Item1/1000;

            //! Esta es la parte del Zoom
            int x = 800 * posXY.Item1 / 1000;
            int y = 800 * posXY.Item2 / 1000;

            mapImage.ZoomTo((float)0, x, y);
            mapImage.Cutting();


            //HUILLCA-------------------------

            /*int addx = 60, addy = 40;//para mejorar la precisión
             * //800 es el 80% del tamaño del mapa(1000x1000)
             * if (posXY.Item1 > 800) addx=0;
             * if (posXY.Item2 > 800) addy=0;*/

            int   spaceMapXY = Configuration.getWidth(640);
            float x2         = (spaceMapXY * (posXY.Item1) / 1000);
            float y2         = (spaceMapXY * (posXY.Item2) / 1000);

            iconMarker.SetX(x2 - Configuration.getWidth(30));          //se resta el ancho del icono
            iconMarker.SetY(y2 - Configuration.getWidth(30));          //se resta la altitud del icono
            iconMarker.Visibility = ViewStates.Visible;

            iconMarker.StartAnimation(fadeOut);
            //-----------------------------------------------------------
        }
Пример #2
0
 public override bool OnDoubleTap(MotionEvent e)
 {
     m_ScaleImageView.MaxZoomTo((int)e.GetX(), (int)e.GetY());
     m_ScaleImageView.Cutting();
     return(true);
 }