Hey !
I have a little problem with my shapefile.
In fact, its my first time with ThinkGeo, and i copy your code in your documentation :
if
(!Page.IsPostBack)
{
// Set the Map Unit. The reason for setting it to DecimalDegrees is that is what the shapefile’s unit of measure is inherently in.
Map1.MapUnit = GeographyUnit.DecimalDegree;
// We create a new Layer and pass the path to a Shapefile into its constructor.
ShapeFileFeatureLayer worldLayer =
new
ShapeFileFeatureLayer(MapPath(
“SampleData/71-.shp”
));
// Set the worldLayer with a preset Style, as AreaStyles.Country1 has YellowGreen background and black border, our worldLayer will have the same render style.
worldLayer.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.
worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
// We need to add the world layer to map’s Static Overlay.
Map1.StaticOverlay.Layers.Add(worldLayer);
// Set a proper extent for the map, that’s the place you want it to display.
Map1.CurrentExtent =
new
RectangleShape(5, 78, 30, 26);
}
But it said : “You don’t have the corresponding idx file for your shape file. You can use the static method ShapeFileFeatureSource.BuildIndexFile() or ShapeFileFeatureLayer.BuildIndexFile() to build an idx file for the shape file, or you can set the RequireIndex property to false.”
So I put this line in my code : ShapeFileFeatureLayer.BuildIndexFile(MapPath(“SampleData/71-.shp”));
And with this line, I have a white control, i havent map in my map-Control…
I use this shapefile : 71-Saone et Loire : actualitix.fr/actgeoshap/71-saone-et-loire.zip
In this website : actualitix.com/shapefiles-des-departements-de-france.html
Can you help me ?