/// <summary> /// Creates and initializes the xMap layer. Be sure to specify a xMap profile and the /// layers to be requested in the properties profile and CustomXMapLayers. /// </summary> /// <param name="name">Layer name</param> /// <param name="url">xMap Server URL</param> /// <param name="user">xMap Server user</param> /// <param name="password">xMap Server password</param> public XMapLayer(string name, string url, string user, string password) : base(name) { InitializeFactory(CanvasCategory.Content, mapView => new UntiledCanvas(mapView, UntiledProvider) { UpdateMapObjects = mapView.Name == "Map" ? UpdateMapObjects : (Action <IEnumerable <IMapObject>, Size>)null, MaxRequestSize = MaxRequestSize, MinLevel = MinLevel }); UntiledProvider = new XMapTiledProvider(url, user, password, XMapMode.Custom); }
public XynLayer(XMapMetaInfo meta, string layerName, string layerCaption) : base(layerName) { // note: the class XMapTiledProvider implements both the interface for tiled and non-tiled layers! UntiledProvider = new XMapTiledProvider(meta.Url, XMapMode.Custom) { User = meta.User, Password = meta.Password, }; Caption = layerCaption; MinLevel = 4; Icon = ResourceHelper.LoadBitmapFromResource("Ptv.XServer.Controls.Map;component/Resources/RoadEditor.png"); }