Hi all,
I load my shapefiles , but it is displaying as the world coordinate, and the map is coming very small.
How do i display this part only and not the full world map.
public void LoadMap()
{
// Set the Map Unit. The reason for setting it to DecimalDegrees is that is what the shapefile’s unit of measure is inherently in.
winformsMap1.MapUnit = GeographyUnit.DecimalDegree;
// We create a new Layer and pass the path to a Shapefile into its constructor.
ShapeFileFeatureLayer indianLayer = new ShapeFileFeatureLayer(@"C:\IND_adm\IND_adm3.shp") { RequireIndex = false };
// Set the worldLayer with a preset Style, as AreaStyles.Country1 has YellowGreen background and black border, our worldLayer will have the same render style.
indianLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1;
// This setting will apply from ZoonLevel01 to ZoomLevel20, that means we can see the world the same style with ZoomLevel01 all the time no matter how far we zoom out/in.
indianLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
// Create a new Layer Overlay to hold the layer we just created
LayerOverlay layerOverlay = new LayerOverlay();
// Add the shapefile layer to the layer overlay
layerOverlay.Layers.Add(indianLayer);
// We need to add the layer overlay to Map.
winformsMap1.Overlays.Add(layerOverlay);
// Set a proper extent for the Map.
// winformsMap1.CurrentExtent = new RectangleShape()
// We now need to call the Refresh() method of the Map control so that the Map can redraw based on the data that has been provided.
// winformsMap1.Refresh();
}