- 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
46 lines
1.2 KiB
C#
46 lines
1.2 KiB
C#
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();
|
|
}
|
|
}
|