Hey,
I’m trying to show a GeoPDF file (link attached) on a map as GeoPdfFeatureLayer with latest 13beta binaries. It seems to open just fine and can be viewed both with internal styles (EnableEmbeddedStyle = true) or with custom styles.
Problems arise when I try to show this file over ThinkGeo cloud raster map when I need to reproject the content.
So the following sample code shows the file just fine but when commented out conversion part is included I’ll get a weird error of Unable to cast object of type 'ThinkGeo.Core.Feature' to type 'CxQ=.2UU='
Source projection string is from the file and target projection is the one that cloud maps use (srid 3857).
var path = @"C:\Temp\Test.pdf";
var layer = new GeoPdfFeatureLayer(path);
//var converter = new ProjectionConverter(
// @"+proj=utm +zone=16 +datum=NAD83 +units=m +no_defs",
// @"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs");
//converter.Open();
//layer.FeatureSource.ProjectionConverter = converter;
layer.EnableEmbeddedStyle = true;
var overlay = new LayerOverlay();
overlay.Layers.Add(layer);
Map.Overlays.Add(overlay);
layer.Open();
var feature = layer.FeatureSource
.GetAllFeatures(ReturningColumnsType.NoColumns)
.First();
Map.CurrentExtent = feature.GetBoundingBox();
Map.Refresh();
Download the Test.pdf