// GET: Marker
        public ActionResult Marker()
        {
            ViewBag.shapeData = this.GetWorldMap();
            string     population = System.IO.File.ReadAllText(Server.MapPath("~/App_Data/MapData/Population.js"));
            object     datasrc    = JsonConvert.DeserializeObject(population, typeof(object));
            MapsMarker marker     = new MapsMarker();

            marker.Visible           = true;
            marker.DataSource        = JsonConvert.DeserializeObject(population, typeof(object));
            marker.AnimationDuration = 0;
            marker.Shape             = MarkerType.Circle;
            marker.Fill   = "white";
            marker.Width  = 10;
            marker.Border = new MapsBorder {
                Width = 2, Color = "#285255"
            };
            marker.TooltipSettings = new MapsTooltipSettings {
                Visible = true, ValuePath = "population", Template = "#template"
            };
            List <MapsMarker> markerSettings = new List <MapsMarker>();

            markerSettings.Add(marker);
            ViewBag.markerSettings = markerSettings;
            return(View());
        }
Пример #2
0
        //
        // GET: /DaraMarker/
        public ActionResult MapsFeatures()
        {
            ViewBag.ShapeData  = this.getUSAMap();
            ViewBag.DataSource = this.getElectionData();
            List <MapsColorMapping> colorMapping = new List <MapsColorMapping>();

            colorMapping.Add(new MapsColorMapping {
                Value = "Trump", Color = "#D84444", Label = null
            });
            colorMapping.Add(new MapsColorMapping {
                Value = "Clinton", Color = "#316DB5", Label = null
            });
            ViewBag.ColorMapping = colorMapping;
            string     population = System.IO.File.ReadAllText(Server.MapPath("~/App_Data/Maps/MapData/markerlocation.json"));
            object     datasrc    = JsonConvert.DeserializeObject(population, typeof(object));
            MapsMarker marker     = new MapsMarker();

            marker.Visible           = false;
            ViewBag.markerDatasource = JsonConvert.DeserializeObject(population, typeof(object));
            marker.AnimationDuration = 0;
            marker.Shape             = MarkerType.Balloon;
            marker.Fill   = "darkgray";
            marker.Width  = 15;
            marker.Height = 25;
            List <MapsMarker> markerSettings = new List <MapsMarker>();

            markerSettings.Add(marker);
            ViewBag.markerSettings = markerSettings;
            return(View());
        }
        // GET: MarkerClustering
        public ActionResult MarkerClustering()
        {
            ViewBag.shapeData = this.GetWorldMap();
            string     population = System.IO.File.ReadAllText(Server.MapPath("~/App_Data/MapData/ClusterData.js"));
            object     datasrc    = JsonConvert.DeserializeObject(population, typeof(object));
            MapsMarker marker     = new MapsMarker();

            marker.Visible           = true;
            marker.DataSource        = JsonConvert.DeserializeObject(population, typeof(object));
            marker.AnimationDuration = 0;
            marker.Shape             = MarkerType.Image;
            marker.Width             = 20;
            marker.Height            = 20;
            marker.TooltipSettings   = new MapsTooltipSettings {
                Visible = true, ValuePath = "area", Template = "#template"
            };
            List <MapsMarker> markerSettings = new List <MapsMarker>();

            markerSettings.Add(marker);
            ViewBag.markerSettings = markerSettings;
            return(View());;
        }
        // GET: Marker
        public ActionResult ProgrammaticZoom()
        {
            ViewBag.shapeData = this.GetWorldMap();
            string     capitals = System.IO.File.ReadAllText(Server.MapPath("~/App_Data/MapData/SouthAmericanCountryCapitals.js"));
            object     datasrc  = JsonConvert.DeserializeObject(capitals, typeof(object));
            MapsMarker marker   = new MapsMarker();

            marker.Visible           = true;
            marker.DataSource        = JsonConvert.DeserializeObject(capitals, typeof(object));
            marker.AnimationDuration = 0;
            marker.Shape             = MarkerType.Image;
            marker.Height            = 20;
            marker.Width             = 20;
            marker.TooltipSettings   = new MapsTooltipSettings {
                Visible = true, ValuePath = "name", Format = "<b>Capital</b> : ${name}<br><b>Country</b> : ${Country}"
            };
            List <MapsMarker> markerSettings = new List <MapsMarker>();

            markerSettings.Add(marker);
            ViewBag.markerSettings = markerSettings;
            return(View());
        }
Пример #5
0
        // GET: Marker
        public ActionResult SalesMap()
        {
            ViewBag.shapeData = this.GetWorldMap();
            string     population = System.IO.File.ReadAllText(Server.MapPath("~/App_Data/MapData/ProductWorth.js"));
            object     datasrc    = JsonConvert.DeserializeObject(population, typeof(object));
            MapsMarker marker     = new MapsMarker();

            marker.Visible           = true;
            marker.DataSource        = JsonConvert.DeserializeObject(population, typeof(object));
            marker.AnimationDuration = 0;
            marker.Shape             = MarkerType.Image;
            marker.Width             = 15;
            marker.Height            = 15;
            marker.TooltipSettings   = new MapsTooltipSettings {
                Visible = true, ValuePath = "area", Format = "<b>Name</b> : ${name}<br><b>Product</b> : ${product}<br><b>Total purchase</b> : ${worth}"
            };
            List <MapsMarker> markerSettings = new List <MapsMarker>();

            markerSettings.Add(marker);
            ViewBag.markerSettings = markerSettings;
            return(View());
        }
        // GET: Multilayer
        public ActionResult Multilayer()
        {
            ViewBag.shapeData = this.getusMap();
            ViewBag.africa    = this.GetCalifornia();
            MapsMarker        marker   = new MapsMarker();
            List <marketData> markData = new List <marketData>();

            markData.Add(new marketData(50.32087157990324, 90.015625, "Asia"));
            markData.Add(new marketData(-25.88583769986199, 134.296875, "Australia"));
            markData.Add(new marketData(16.97274101999902, 16.390625, "Africa"));
            markData.Add(new marketData(49.95121990866204, 18.468749999999998, "Europe"));
            markData.Add(new marketData(59.88893689676585, -109.3359375, "North America"));
            markData.Add(new marketData(-6.64607562172573, -55.54687499999999, "South America"));
            marker.DataSource        = markData;
            marker.Visible           = true;
            marker.Template          = "<div id=" + "marker1" + " class=markerTemplate" + ">{{:name}}" + "</div>";
            marker.AnimationDuration = 0;
            List <MapsMarker> markerSettings = new List <MapsMarker>();

            markerSettings.Add(marker);
            ViewBag.markerSettings = markerSettings;
            return(View());
        }