ThinkGeo.com    |     Documentation    |     Premium Support

The USA county layers does not show on the world map

I bought the WorldMapKit. When I brought up the world map, I do not see the county layers on the world map.


The code came with the worldmapkit is as following. What’s wrong with the code? I really need to add the USA county layers on my world map. Please help. Thanks


private void LoadStateSymbolLayers(string StateLayer)
        {
            if (StateLayer.Contains(“ctycu”))
            {
                string[] folders = Directory.GetDirectories(dataFolder + “\” + StateLayer);
                foreach (string folder in folders)
                {
                    string[] files = Directory.GetFiles(folder, “*.shp”);
                    foreach (string file in files)
                    {

                      WorldMapKitShapeFileFeatureLayer layer = new WorldMapKitShapeFileFeatureLayer(file);

                      layer.Name = “County”;
                      layer.DrawingQuality = DrawingQuality.HighQuality;
                      layer.ZoomLevelSet.ZoomLevel12.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.StandardColors.Red);
                      layer.ZoomLevelSet.ZoomLevel12.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
                      staticLayers.Add(layer);
                    }
                }
            }
            else
            {
                string[] folders = Directory.GetDirectories(dataFolder + “\” + StateLayer);
                foreach (string folder in folders)
                {
                    string[] files = Directory.GetFiles(folder, “*.shp”);
                    foreach (string file in files)
                    {
                        WorldMapKitShapeFileFeatureLayer layer = new WorldMapKitShapeFileFeatureLayer(file);
                        layer.Name = “Lakes/Rivers”;
                        layer.DrawingQuality = DrawingQuality.HighSpeed;
                        layer.ZoomLevelSet.ZoomLevel12.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.FromArgb(255, 153, 179, 204));
                        layer.ZoomLevelSet.ZoomLevel12.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
                        staticLayers.Add(layer);
                    }
                }
            }
        }


It is very difficult to read your code because it is not correclty formatted. Please, use the "How To Post source Code" section.


gis.thinkgeo.com/Support/Discussion...fault.aspx


Also, of course, having a self contained sample app that we can run and see the problem occuring is always the most efficient way for us to find a problem. So, do not hesitate to send us a sample app for that purpose.


Thank you.