Integration and add heat map demo
- Implemented OpenStreetMap using WebView with Leaflet.js - Added OpenStreetMapView component with interactive map functionality - Created heat map visualization with color-coded intensity - Added 30 dummy location points around San Francisco Bay Area - Implemented location tracking with real-time pin placement - Added comprehensive UI with two-row button layout - Features: Start/Stop tracking, Center map, Demo heat map, Clear demo, Reset map - Added location count display and confirmation dialogs - Updated project structure and documentation - All functionality tested and working on Android emulator
This commit is contained in:
45
LocationTrackerApp/MauiProgram.cs
Normal file
45
LocationTrackerApp/MauiProgram.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using LocationTrackerApp.Services;
|
||||
using LocationTrackerApp.Data;
|
||||
using LocationTrackerApp.ViewModels;
|
||||
using LocationTrackerApp.Views;
|
||||
|
||||
namespace LocationTrackerApp;
|
||||
|
||||
public static class MauiProgram
|
||||
{
|
||||
public static MauiApp CreateMauiApp()
|
||||
{
|
||||
var builder = MauiApp.CreateBuilder();
|
||||
builder
|
||||
.UseMauiApp<App>()
|
||||
.ConfigureFonts(fonts =>
|
||||
{
|
||||
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
|
||||
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
|
||||
});
|
||||
|
||||
// Configure logging
|
||||
#if DEBUG
|
||||
builder.Logging.AddDebug();
|
||||
#endif
|
||||
|
||||
// Register services
|
||||
builder.Services.AddSingleton<LocationDbContext>(provider =>
|
||||
{
|
||||
var dbPath = Path.Combine(FileSystem.AppDataDirectory, "location_tracker.db");
|
||||
return new LocationDbContext(dbPath);
|
||||
});
|
||||
|
||||
builder.Services.AddSingleton<ILocationService, LocationService>();
|
||||
builder.Services.AddSingleton<IConfigurationService, ConfigurationService>();
|
||||
|
||||
// Register view models
|
||||
builder.Services.AddTransient<MainViewModel>();
|
||||
|
||||
// Register views
|
||||
builder.Services.AddTransient<MainView>();
|
||||
|
||||
return builder.Build();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user