Example #1
0
        protected void InitializeMonitor()
        {
            Monitor.DrawLine        += MonitorDrawLine;
            Monitor.FeatureModified += MonitorFeatureModified;
            Monitor.EnableTimer      = false;
            if (IsPostBack)
            {
                return;
            }

            Monitor.DrawLineMethod   = EventMethods.PostBack;
            Monitor.ModFeatureMethod = EventMethods.PostBack;

            Monitor.ImgPath          = Config.Monitor.GetMonitorImagesFolder(Page);
            Monitor.GoogleMapsScript = Config.Map.GoogleMapsKey;

            Monitor.AddLayers(LayerFactory.GetGoogleStreet(CultureManager.GetLabel("LAYER_GSTREET"), MinZoomLevel),
                              //LayerFactory.GetCompumap(CultureManager.GetLabel("LAYER_COMPUMAP"), Config.Map.CompumapTiles, MIN_ZOOM_LEVEL),
                              LayerFactory.GetOpenStreetMap(CultureManager.GetLabel("LAYER_OSM")),
                              LayerFactory.GetGoogleSatellite(CultureManager.GetLabel("LAYER_GSAT"), MinZoomLevel),
                              LayerFactory.GetGoogleHybrid(CultureManager.GetLabel("LAYER_GHIBRIDO"), MinZoomLevel),
                              LayerFactory.GetGooglePhysical(CultureManager.GetLabel("LAYER_GFISICO"), MinZoomLevel),
                              LayerFactory.GetVector(LayerRecorrido, true, StyleFactory.GetHandlePoint()),
                              LayerFactory.GetMarkers(LayerMarkers, true));

            Monitor.AddControls(ControlFactory.GetLayerSwitcher(),
                                ControlFactory.GetNavigation(),
                                ControlFactory.GetPanZoomBar(),
                                ControlFactory.GetToolbar(false, false, false, true, false, true, false, false, LayerRecorrido));
            if (MapLoad != null)
            {
                MapLoad(Monitor, EventArgs.Empty);
            }
        }
Example #2
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            if (IsPostBack)
            {
                return;
            }

            monitor.Initialize(true);
            monitor.AddLayers(LayerFactory.GetVector(LayerAsignados, true, StyleFactory.GetHandlePoint()));
            monitor.AddLayers(LayerFactory.GetVector(LayerNoAsignados, true, StyleFactory.GetHandlePoint()));
            monitor.AddLayers(LayerFactory.GetVector(LayerRecorrido, true, StyleFactory.GetHandlePoint()));
        }
Example #3
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            if (IsPostBack)
            {
                return;
            }

            var googleMapsEnabled = true;
            var usuario           = DAOFactory.UsuarioDAO.FindById(WebSecurity.AuthenticatedUser.Id);

            if (usuario != null && usuario.PorEmpresa && usuario.Empresas.Count == 1)
            {
                var empresa = usuario.Empresas.First() as Empresa;
                if (empresa != null)
                {
                    googleMapsEnabled = empresa.GoogleMapsEnabled;
                }
            }

            Monitor.Initialize(googleMapsEnabled);
            Monitor.AddLayers(LayerFactory.GetVector(LayerAsignados, true, StyleFactory.GetHandlePoint()));
            Monitor.AddLayers(LayerFactory.GetVector(LayerNoAsignados, true, StyleFactory.GetHandlePoint()));
        }