private void gMapContrLeguia_Load(object sender, EventArgs e)
        {
            ClsNIncidencias N = new ClsNIncidencias();

            alertas = N.MtdListarIncidencias();
            gMapContrLeguia.DragButton  = MouseButtons.Left;
            gMapContrLeguia.CanDragMap  = true;
            gMapContrLeguia.MapProvider = GMapProviders.GoogleMap;
            gMapContrLeguia.Position    = new PointLatLng(LatitudAlbarracin, LongiTudAlbarracin);
            gMapContrLeguia.MinZoom     = 0;
            gMapContrLeguia.MaxZoom     = 24;
            gMapContrLeguia.Zoom        = 16;
            gMapContrLeguia.AutoScroll  = true;

            //MARCADOR
            foreach (DataRow fila in alertas.Rows)
            {
                markerOverlay = new GMapOverlay("Marcador");
                string latitud  = (fila[0].ToString()).Replace(',', '.');
                string longitud = (fila[1].ToString()).Replace(',', '.');
                marker = new GMarkerGoogle(new PointLatLng(Convert.ToDouble(latitud), Convert.ToDouble(longitud)), GMarkerGoogleType.blue);
                markerOverlay.Markers.Add(marker);//Agregamos al mapa
                //agregamos un tooltip de texto a los marcadores
                marker.ToolTipMode = MarkerTooltipMode.Always;
                marker.ToolTipText = string.Format(fila[4].ToString() + "\n" + fila[5].ToString());

                //Ahora agregamos el mapa y el marcador al map control
                gMapContrLeguia.Overlays.Add(markerOverlay);
                CreateCircle(Convert.ToDouble(latitud), Convert.ToDouble(longitud), 100.899431);
            }
        }
Beispiel #2
0
        private void gMapContrLeguia_Load(object sender, EventArgs e)
        {
            gMapContrLeguia.DragButton  = MouseButtons.Left;
            gMapContrLeguia.CanDragMap  = true;
            gMapContrLeguia.MapProvider = GMapProviders.GoogleMap;
            gMapContrLeguia.Position    = new PointLatLng(LatitudAlbarracin, LongiTudAlbarracin);
            gMapContrLeguia.MinZoom     = 0;
            gMapContrLeguia.MaxZoom     = 24;
            gMapContrLeguia.Zoom        = 16;
            gMapContrLeguia.AutoScroll  = true;
            ClsNIncidencias N = new ClsNIncidencias();

            //MARCADOR
            foreach (ClsEalerta fila in N.listarIncidencias())
            {
                markerOverlay = new GMapOverlay("Marcador");
                string latitud  = fila.Latitud;
                string longitud = fila.Latitud;
                marker = new GMarkerGoogle(new PointLatLng(Convert.ToDouble(latitud), Convert.ToDouble(longitud)), GMarkerGoogleType.blue);
                markerOverlay.Markers.Add(marker);//Agregamos al mapa
                //agregamos un tooltip de texto a los marcadores
                marker.ToolTipMode = MarkerTooltipMode.Always;
                DateTime fecha = (DateTime)fila.Fecha;
                marker.ToolTipText = string.Format(fila.DniCli + " - " + fila.Hora + " - " + fecha.ToShortDateString() + "\n" + "Nombre del Usario");
                //Ahora agregamos el mapa y el marcador al map control
                gMapContrLeguia.Overlays.Add(markerOverlay);
                CreateCircle(Convert.ToDouble(latitud), Convert.ToDouble(longitud), 100.899431);
            }
        }
        private void frmBaseSeguridad_Load(object sender, EventArgs e)
        {
            ClsNIncidencias N = new ClsNIncidencias();

            alertas = N.MtdListarIncidencias();
        }