I have sent a .kmz file to support@thinkgeo.com that I would like to see if it can be used as a layer in Thinkgeo. I extract it out to .kml then I have tried to load it into my map with the following:
var goeClr =
new
GeoColor(clr.A, clr.R, clr.G, clr.B);
sfLayer.StylingType = KmlStylingType.EmbeddedStyling;
sfLayer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle =
new
LineStyle(
new
GeoPen(goeClr, 2));
sfLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle =
new
AreaStyle(
new
GeoPen(goeClr, 2),
new
GeoSolidBrush(GeoColor.StandardColors.Transparent));
sfLayer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.City3;
sfLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.Urban1(
“NAME”
);
sfLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.OverlappingRule = LabelOverlappingRule.NoOverlapping;
sfLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
if
(MapkitMap.Overlays.Contains(GlobalHelpers.DYNAMIC_CABLES_OVERLAY))
{
FileInfo fi =
new
FileInfo(sfLayer.KmlPathFilename);
LayerOverlay sqlLayers = (LayerOverlay)MapkitMap.Overlays[GlobalHelpers.DYNAMIC_CABLES_OVERLAY];
if
(!sqlLayers.Layers.Contains(fi.Name))
{
ManagedProj4Projection proj4 =
new
ManagedProj4Projection();
proj4.InternalProjectionParametersString = Proj4Projection.GetWgs84ParametersString();
proj4.ExternalProjectionParametersString = ManagedProj4Projection.GetEpsgParametersString(3857);
proj4.Open();
sqlLayers.Layers.Add(fi.Name, sfLayer);
sfLayer.Open();
sfLayer.FeatureSource.Projection = proj4;
sfLayer.Close();
}
sqlLayers.Refresh();
}
The issues I am seeing is that the projection doesn’t seem to do anything for the file. It never projects it into the meter projection that I can see. Since it doesn’t project correctly (I have tried a few different parameter strings) I can’t tell in the images are being displayed or not. Is there anything you can see that would make the kml file I sent not display correctly?