ThinkGeo.com    |     Documentation    |     Premium Support

KML File Data not showing west of 180

Hello,

We have a KML file where the data shows on the map east of 180 just fine, but does not show up west of 180. Our map unit is set to meter. Any idea why nothing west of 180 would show? When opened in Google Earth, all data is visible.

Here is the file:
https://send.firefox.com/download/dc0556f149/#dVo_Z9HxOagLlPaAlplsIg

Thanks,
Dib

Hi Dib,

It looks both GoogleEarth and our map render two part shapes.

Here is the sample code:

            winformsMap1.MapUnit = GeographyUnit.Meter;
        
        winformsMap1.BackgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.FromArgb(255, 198, 255, 255));
        winformsMap1.ZoomLevelSnapping = ZoomLevelSnappingMode.Default;

        KmlFeatureLayer.BuildIndexFile("../../App_Data/WindProbsTropicalStorm.kml", BuildIndexMode.Rebuild);
        KmlFeatureLayer layer = new KmlFeatureLayer("../../App_Data/WindProbsTropicalStorm.kml");
        layer.StylingType = KmlStylingType.StandardStyling;
        layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;

        layer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = new AreaStyle(new GeoPen(GeoColor.SimpleColors.Black), new GeoSolidBrush(GeoColor.SimpleColors.Yellow));
        layer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = new LineStyle(new GeoPen(GeoColor.SimpleColors.Blue, 5));
        layer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = new PointStyle(PointSymbolType.Circle, new GeoSolidBrush(GeoColor.SimpleColors.Green), 10);

        LayerOverlay stateOverlay = new LayerOverlay();
        stateOverlay.Layers.Add("KmlLayer", layer);
        winformsMap1.Overlays.Add("StateOverlay", stateOverlay);

        layer.Open();
        Collection<Feature> fs = layer.FeatureSource.GetAllFeatures(ReturningColumnsType.NoColumns);
        winformsMap1.CurrentExtent = layer.GetBoundingBox();
        winformsMap1.Refresh();

Regards,

Ethan