https://github.com/giorgi/maui-dotnetconf-sample
Maui Spatial Data Sample App
https://github.com/giorgi/maui-dotnetconf-sample
efcore maui net-core npgsql postgresql spatial-data
Last synced: 3 months ago
JSON representation
Maui Spatial Data Sample App
- Host: GitHub
- URL: https://github.com/giorgi/maui-dotnetconf-sample
- Owner: Giorgi
- Created: 2023-11-13T21:14:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-21T08:20:36.000Z (over 1 year ago)
- Last Synced: 2025-03-29T06:51:36.703Z (4 months ago)
- Topics: efcore, maui, net-core, npgsql, postgresql, spatial-data
- Language: C#
- Homepage:
- Size: 1.13 MB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Maui DotNetConf 2023 Spatial Data Sample App
## Overview
This is a sample app and backend code for my [Spatial Data with Entity Framework Core and .NET MAUI](https://www.dotnetconf.net/agenda#536258) session.
The code demonstrates how to work with spatial data with EF Core and ASP.NET and how to use MAUI Map control.
The projects use the following libraries:
- [NetTopologySuite](https://github.com/NetTopologySuite/NetTopologySuite)
- [NetTopologySuite.IO.GeoJSON](https://github.com/NetTopologySuite/NetTopologySuite.IO.GeoJSON)
- [Npgsql.EntityFrameworkCore.PostgreSQL](https://github.com/npgsql/efcore.pg) && [Npgsql.NetTopologySuite](https://github.com/npgsql/npgsql)
- [.NET MAUI Community Toolkit](https://github.com/CommunityToolkit/Maui)
- [.NET Community Toolkit](https://github.com/CommunityToolkit/dotnet)
- [Refit](https://github.com/reactiveui/refit)## Running the projects locally
There are several steps required to run the project locally
### Set up PostgreSQL database
The backend project uses PostgreSQL. Once you set up the PostgreSQL server, [create a spatial database](https://postgis.net/workshops/en/postgis-intro/creating_db.html)
and [restore data.](https://postgis.net/workshops/en/postgis-intro/loading_data.html). Next, run [scripts.sql](https://github.com/Giorgi/Maui-DotNetConf-Sample/blob/main/SpatialData.Api/scripts.sql) from the project. Finally, update the connection string in the project.### Get a Google Maps API key
To use the Map control follow the [Platform configuration](https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/map?view=net-maui-8.0#platform-configuration) steps from the official documentation### Set service endpoint
If you use a different port or want to run the app on a local device, you must update the service base url in `MauiProgram.cs`

