public void Add() { //AppState.ViewDef.Layers.ChildLayers.Add(pl); IsRunning = true; this.ImageUrl = "http://googlediscovery.com/wp-content/uploads/panoramio.png"; service = new SaveService() { IsLocal = true, Name = "lookr", Id = Guid.NewGuid(), IsFileBased = false, StaticService = true, IsVisible = false, RelativeFolder = "Social Media" }; service.Init(Mode.client, AppState.DataServer); // TODO Check met Arnoud of dit niet de folder moet zijn die in de configoffline staat? service.Folder = Path.Combine(Directory.GetCurrentDirectory(),@"\PoiLayers\Social Media"); service.InitPoiService(); service.Settings.OpenTab = false; service.Settings.Icon = "brugwhite.png"; service.AutoStart = true; webcam = new PoI { PoiId = "Webcam", Style = new PoIStyle { DrawingMode = DrawingModes.Image, FillColor = Colors.Red, CallOutFillColor = Colors.White, CallOutForeground = Colors.Black, IconWidth = 30, IconHeight = 30, TapMode = TapMode.OpenMedia, TitleMode = TitleModes.None } }; webcam.AddMetaInfo("name", "name"); //result.AddMetaInfo("height", "height", MetaTypes.number); //result.AddMetaInfo("width", "width", MetaTypes.number); //result.AddMetaInfo("description", "description"); //result.AddMetaInfo("image", "image", MetaTypes.image); service.PoITypes.Add(webcam); AppState.DataServer.Services.Add(service); AppState.ViewDef.MapControl.ExtentChanged += MapControl_ExtentChanged; DownloadCams(); }
public void CreateService() { AppState.ViewDef.FolderIcons[@"AcceleratedLayers\Search Result"] = "pack://*****:*****@"\PoiLayers\Search Result"; SearchService.InitPoiService(); SearchService.Settings.OpenTab = false; SearchService.Settings.Icon = "brugwhite.png"; SearchService.AutoStart = true; result = new PoI { ContentId = "Brug", Style = new PoIStyle { DrawingMode = DrawingModes.Point, FillColor = Colors.Red, CallOutFillColor = Colors.White, CallOutForeground = Colors.Black, IconWidth = 30, IconHeight = 30, TitleMode = TitleModes.Bottom } }; result.AddMetaInfo("name", "name"); //result.AddMetaInfo("height", "height", MetaTypes.number); //result.AddMetaInfo("width", "width", MetaTypes.number); //result.AddMetaInfo("description", "description"); //result.AddMetaInfo("image", "image", MetaTypes.image); SearchService.PoITypes.Add(result); DataServer.Services.Add(SearchService); }