How do I set an initial map extent? In the getting started sample the CurrentExtent is set to a RectangleShape. Is there a way to determine this from my shape layer?
I am trying to display a single line layer but nothing is being displayed. I have copied code from the getting started app and changed a few lines to suit my line style. I don't know the initial erxtent to set. I'm sure V2 used to automatically work out the best extent to set intially?
What am I doing wrong?
I can send the shape file if required. It worked fine under V2 and loads in map explorer. Here is my code.
winformsMap1.MapUnit = GeographyUnit.Meter;
ShapeFileFeatureLayer worldLayer = new ShapeFileFeatureLayer(@"D:\KernMobileGisData\MoretonBay V3\Assets\MBRC_Roadcentreline.shp");
worldLayer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.Highway1;
worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
LayerOverlay layerOverlay = new LayerOverlay();
layerOverlay.Layers.Add(worldLayer);
winformsMap1.Overlays.Add(layerOverlay);
winformsMap1.Refresh();
Thanks. Steve