In 10.2.7 why does FullExtent return null. For example
KmlLayer kml = new KmlLayer();
kml.SourceUri = KmlPFN;
var fe =kml.FullExtent;
I always seem to get null for FullExtent.
In 10.2.7 why does FullExtent return null. For example
KmlLayer kml = new KmlLayer();
kml.SourceUri = KmlPFN;
var fe =kml.FullExtent;
I always seem to get null for FullExtent.
The full extent isn't available for any layer until they have loaded its data. Try
await layer.InitializeAsync(); //in v100.x this is called LoadAsync() but is essentially the same thing
and then check afterwards.
I've tried this but it does not work.
KmlLayer kml = new KmlLayer();
kml.SourceUri = KmlPFN;
kml.InitializeAsync().Wait();
var fe = kml.FullExtent;
(I'm using .Wait() as I don't want to change ALL my code existing code to use async).
Does the KmlLayer have to be added onto a Map or MapView before the file is read in and FileExtent calculated?
Is there a loading data step necessary? With 100.x you only get the extent when the metadata is loaded, because of the ILoadable pattern. But I don't know if it is also used in your version.
Loadable pattern for asynchronous resources—ArcGIS Runtime SDK for .NET (WPF) | ArcGIS for Developers