I have designed a map and published it on production server. It works on my computer but it doesn't work on production server.It gives " non static method requires a target " error. Here is my code.
Map1.MapUnit =
GeographyUnit.DecimalDegree;new RectangleShape(25.45, 42.21, 44.77, 35.71);new RectangleShape(25.45, 42.21, 44.77, 35.71); // Restricts the area to Turkey
Map1.MapBackground.BackgroundBrush =
worldLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = worldLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle =
worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel =
worldLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle =
worldLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle =
staticOverlay.IsBaseOverlay =
staticOverlay.Layers.Add(worldLayer);
Map1.CustomOverlays.Add(staticOverlay);
new GeoSolidBrush(GeoColor.GeographicColors.Sand);TabFileFeatureLayer worldLayer = new TabFileFeatureLayer(HttpContext.Current.Server.MapPath(@"~/MapData/IlSiniri.TAB"), "PlakaNo");AreaStyles.CreateSimpleAreaStyle(GeoColor.FromArgb(100, GeoColor.SimpleColors.Green), GeoColor.SimpleColors.Green);ApplyUntilZoomLevel.Level20;TextStyles.Swamp1("IlAdi");TextStyles.Swamp1("IlAdi");LayerOverlay staticOverlay = new LayerOverlay("StaticOverlay");false;
Thansk in advance.
Map1.CurrentExtent =
Map1.RestrictedExtent =