aves/lib/model/settings/map_style.dart
Thibault Deckers fd8191639b insets fixes
2021-01-19 18:31:18 +09:00

34 lines
1,006 B
Dart

// browse providers at https://leaflet-extras.github.io/leaflet-providers/preview/
enum EntryMapStyle { googleNormal, googleHybrid, googleTerrain, osmHot, stamenToner, stamenWatercolor }
extension ExtraEntryMapStyle on EntryMapStyle {
String get name {
switch (this) {
case EntryMapStyle.googleNormal:
return 'Google Maps';
case EntryMapStyle.googleHybrid:
return 'Google Maps (Hybrid)';
case EntryMapStyle.googleTerrain:
return 'Google Maps (Terrain)';
case EntryMapStyle.osmHot:
return 'Humanitarian OSM';
case EntryMapStyle.stamenToner:
return 'Stamen Toner';
case EntryMapStyle.stamenWatercolor:
return 'Stamen Watercolor';
default:
return toString();
}
}
bool get isGoogleMaps {
switch (this) {
case EntryMapStyle.googleNormal:
case EntryMapStyle.googleHybrid:
case EntryMapStyle.googleTerrain:
return true;
default:
return false;
}
}
}