MapSource
Abstract base class for all data sources that provide shapefile data to the MapShapeReader. Provides factory methods to create MapSource instances from various sources including embedded resources, files, streams, and URIs.
Definition
Namespace:Telerik.Maui.Controls.Map
Assembly:Telerik.Maui.Controls.dll
Syntax:
public abstract class MapSource : NotifyPropertyChangedBase, INotifyPropertyChanged
Inheritance: objectNotifyPropertyChangedBaseMapSource
Derived Classes:
Implements:
Inherited Members
Constructors
protected MapSource()
Methods
Creates a MapSource from a file path on the local file system. Use this method to load shapefiles from the device's storage or application bundle.
Creates a MapSource from an embedded resource within an assembly. This is the most common way to include shapefile data with your application.
public static MapSource FromResource(string resource, Assembly sourceAssembly = null)
The full name of the embedded resource containing the shapefile (e.g., "MyApp.Data.world.shp").
sourceAssemblyAssemblyThe assembly containing the embedded resource. If null, uses the calling assembly.
Returns:A MapSource that reads from the specified embedded resource.
Creates a MapSource from an embedded resource using a type to resolve the assembly. This is a convenience overload that automatically determines the assembly from the provided type.
public static MapSource FromResource(string resource, Type resolvingType)
The full name of the embedded resource containing the shapefile.
resolvingTypeTypeA type from the assembly containing the embedded resource.
Returns:A MapSource that reads from the specified embedded resource.