mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 08:46:18 +01:00
Rename GpsMap to StaticMap
This commit is contained in:
parent
55880944ce
commit
7c290a1825
6 changed files with 10 additions and 12 deletions
|
@ -355,7 +355,7 @@ class _ViewerDetailPaneState extends State<ViewerDetailPane> {
|
||||||
height: 256,
|
height: 256,
|
||||||
child: ValueStreamBuilder<GpsMapProvider>(
|
child: ValueStreamBuilder<GpsMapProvider>(
|
||||||
stream: context.read<PrefController>().gpsMapProvider,
|
stream: context.read<PrefController>().gpsMapProvider,
|
||||||
builder: (context, gpsMapProvider) => GpsMap(
|
builder: (context, gpsMapProvider) => StaticMap(
|
||||||
providerHint: gpsMapProvider.requireData,
|
providerHint: gpsMapProvider.requireData,
|
||||||
location: CameraPosition(center: _gps!, zoom: 16),
|
location: CameraPosition(center: _gps!, zoom: 16),
|
||||||
onTap: _onMapTap,
|
onTap: _onMapTap,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
library np_gps_map;
|
library np_gps_map;
|
||||||
|
|
||||||
export 'src/gps_map.dart';
|
|
||||||
export 'src/interactive_map.dart';
|
export 'src/interactive_map.dart';
|
||||||
export 'src/place_picker.dart';
|
export 'src/place_picker.dart';
|
||||||
|
export 'src/static_map.dart';
|
||||||
export 'src/type.dart';
|
export 'src/type.dart';
|
||||||
export 'src/util.dart' show initGpsMap;
|
export 'src/util.dart' show initGpsMap;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:np_gps_map/src/gps_map.dart';
|
|
||||||
import 'package:np_gps_map/src/interactive_map/google.dart';
|
import 'package:np_gps_map/src/interactive_map/google.dart';
|
||||||
import 'package:np_gps_map/src/interactive_map/osm.dart';
|
import 'package:np_gps_map/src/interactive_map/osm.dart';
|
||||||
import 'package:np_gps_map/src/type.dart';
|
import 'package:np_gps_map/src/type.dart';
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:np_gps_map/src/gps_map.dart';
|
|
||||||
import 'package:np_gps_map/src/interactive_map.dart';
|
import 'package:np_gps_map/src/interactive_map.dart';
|
||||||
import 'package:np_gps_map/src/type.dart';
|
import 'package:np_gps_map/src/type.dart';
|
||||||
|
|
||||||
|
|
|
@ -6,14 +6,8 @@ import 'package:np_gps_map/src/type.dart';
|
||||||
import 'package:np_gps_map/src/util.dart';
|
import 'package:np_gps_map/src/util.dart';
|
||||||
import 'package:np_platform_util/np_platform_util.dart';
|
import 'package:np_platform_util/np_platform_util.dart';
|
||||||
|
|
||||||
enum GpsMapProvider {
|
class StaticMap extends StatelessWidget {
|
||||||
google,
|
const StaticMap({
|
||||||
osm,
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
class GpsMap extends StatelessWidget {
|
|
||||||
const GpsMap({
|
|
||||||
super.key,
|
super.key,
|
||||||
required this.providerHint,
|
required this.providerHint,
|
||||||
required this.location,
|
required this.location,
|
|
@ -3,6 +3,12 @@ import 'package:google_maps_flutter/google_maps_flutter.dart' as gmap;
|
||||||
import 'package:latlong2/latlong.dart';
|
import 'package:latlong2/latlong.dart';
|
||||||
import 'package:np_common/type.dart';
|
import 'package:np_common/type.dart';
|
||||||
|
|
||||||
|
enum GpsMapProvider {
|
||||||
|
google,
|
||||||
|
osm,
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
/// A pair of latitude and longitude coordinates, stored as degrees
|
/// A pair of latitude and longitude coordinates, stored as degrees
|
||||||
class MapCoord {
|
class MapCoord {
|
||||||
const MapCoord(this.latitude, this.longitude);
|
const MapCoord(this.latitude, this.longitude);
|
||||||
|
|
Loading…
Reference in a new issue