Marqdouj.DotNet.Web.JsInterop.GeoJson
10.7.0
Prefix Reserved
dotnet add package Marqdouj.DotNet.Web.JsInterop.GeoJson --version 10.7.0
NuGet\Install-Package Marqdouj.DotNet.Web.JsInterop.GeoJson -Version 10.7.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Marqdouj.DotNet.Web.JsInterop.GeoJson" Version="10.7.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Marqdouj.DotNet.Web.JsInterop.GeoJson" Version="10.7.0" />
<PackageReference Include="Marqdouj.DotNet.Web.JsInterop.GeoJson" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Marqdouj.DotNet.Web.JsInterop.GeoJson --version 10.7.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Marqdouj.DotNet.Web.JsInterop.GeoJson, 10.7.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Marqdouj.DotNet.Web.JsInterop.GeoJson@10.7.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Marqdouj.DotNet.Web.JsInterop.GeoJson&version=10.7.0
#tool nuget:?package=Marqdouj.DotNet.Web.JsInterop.GeoJson&version=10.7.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
DotNet.Web.JsInterop.GeoJson
A .NET library for working with GeoJSON data in JavaScript interop scenarios.
Features
- Provides a set of classes and methods for parsing, manipulating, and generating GeoJSON data.
- Supports various GeoJSON types, including Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection, Feature, and FeatureCollection.
Serialization
- All GeoJSON types can be serialized to JSON format using the built-in
System.Text.Jsonlibrary, exceptGeometryCollectionwhich requires special handling.- A default
ToJsonmethod is provided for each type. GeometryCollection. This type requires special handling during serialization, as it contains a collection of geometries that can be of any GeoJSON type. The defaultToJsonmethod implements the requirements to correctly serialize a GeometryCollection.
- A default
Deserialization
- All GeoJSON types can be serialized to JSON format using the built-in
System.Text.Jsonlibrary, exceptGeometryCollectionwhich requires special handling. - A default
FromJsonmethod is provided for each type. GeometryCollection. This type requires special handling during deserialization, as it contains a collection of geometries that can be of any GeoJSON type. The defaultFromJsonmethod implements the requirements to correctly deserialize a GeometryCollection.
Usage
- See the
Sandboxproject in the source code for examples of how to use the library in a Blazor application.
Release Notes
v10.7.0GeoJsonProperties. A second constructor has been added that allows you to specify StringComparer.
v10.6.2Feature.Id. Default is now a Guid string.
v10.6.1IFeature. AddIdto interface.
v10.6.0Pixel/IPixel. New object/interface for a Pixel.
v10.5.2Interfaces. Added interfaces to all IGeoJSON objects to identify their specific types.- Helps with type checking and casting of types, especially when working with c#
Generics. - The new interfaces are:
IFeature,IFeature{G, P}: IFeature where G : Geometry.IFeatureCollection,IFeatureCollection{G, P} : IFeatureCollection where G : Geometry.IGeometryCollection.ILineString.IMultiLineString.IMultiPoint.IMultiPolygon.IPoint.IPolygon.IPosition.
- Helps with type checking and casting of types, especially when working with c#
v10.5.1IGeoJsonObject. Interface added to identify objects that derive fromGeoJsonObject.- Helps with type checking and casting of types, especially when working with c#
Generics.
- Helps with type checking and casting of types, especially when working with c#
IGeoJSON. Interface added to identify objects used in GeoJSON operations. IncludesPosition,IGeoJsonObjectandIGeometry.- Helps with type checking and casting of types, especially when working with c#
Generics.
- Helps with type checking and casting of types, especially when working with c#
v10.5.0IGeometryinterface added to theGeometrybase class. Helps with type checking and casting of geometry types, especially when working with c#Generics.
v10.4.0- Update NuGet packages.
v10.3.1Position. AddedToString(string format)method.
v10.3.0- Changed method signature
FeatureCollection<T, GeoJsonProperties>? FromJson<T>toFeatureCollection<T, P>? FromJson<T>.
- Changed method signature
v10.2.1- Update NuGet packages.
v10.2.0- Added interface
IBoundingBoxEditfor editingBoundingBoxinstances.
- Added interface
v10.1.1- Update NuGet packages.
v10.1.0Position. Longitude, Latitude, and Elevation have been changed to full properties.
v10.0.0. Initial release with basic GeoJSON parsing and generation capabilities.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Marqdouj.DotNet.Web.JsInterop.GeoJson:
| Package | Downloads |
|---|---|
|
Marqdouj.DotNet.Web.JsInterop.Azure.Maps
Designed for Blazor interaction with the Azure Maps SDK |
|
|
Marqdouj.DotNet.Web.JsInterop.Azure.Maps.Atlas
Designed for JSInterop interaction with the Azure Maps SDK |
GitHub repositories
This package is not used by any popular GitHub repositories.