Hi, I’ve got some shape files which load fine and other which don’t error out when loading but simply do not show up on the map. When I load those shape files in external tools like mapshaper.org or QGis they load fine and look as I expect them to look. They are some of the simpler shape files we have so it really confuses me why much larger ones load and these ones don’t.
Code to create shape layer and set projection on it. I’ve attached a zip with the shape file which is pretty basic. If anyone can help I would greatly appreciate it.
01.
var shapeLocation = @
“C:\Users\Kevin.IWS.000\AppData\Local\Temp\Falcon32015\SavedMaps\55697\55697-new.shp”
;
02.
ShapeFileFeatureLayer.BuildIndexFile(shapeLocation, BuildIndexMode.Rebuild);
03.
ShapeFileFeatureLayer shapeLayer =
new
ShapeFileFeatureLayer(shapeLocation);
04.
shapeLayer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle =
new
LineStyle(
new
GeoPen(GeoBrushes.PastelYellow));
05.
06.
Proj4Projection proj4 =
new
Proj4Projection();
07.
proj4.InternalProjectionParametersString = Proj4Projection.GetWgs84ParametersString();
08.
proj4.ExternalProjectionParametersString = Proj4Projection.GetSphericalMercatorParametersString();
09.
10.
shapeLayer.FeatureSource.Projection = proj4;
11.
shapeLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
55697.zip (1.27 KB)