Skip to content

Commit

Permalink
Cadastre imagery (increases db size by 3 MB) and fixed zooming when a…
Browse files Browse the repository at this point in the history
…dding a new object
  • Loading branch information
Zverik committed Jan 28, 2025
1 parent 442ce34 commit 07c1536
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ _Unreleased_
* Enabled overzoom for Esri tiles.
* Fax and mobile fields are treated as phone numbers.
* Fixed editing in extreme latitudes.
* Disabled zoom change when tapping the (+) button.
* Fixed missing recently used presets when adding a thing.
* Added cadastre imagery layers.
* Updated presets and imagery layers.

## 5.3
Expand Down
2 changes: 1 addition & 1 deletion lib/constants.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart' show Colors, TextStyle;

const kAppTitle = 'Every Door';
const kAppVersion = '5.4-beta1'; // Also used for presets.db versioning
const kAppVersion = '5.4'; // Also used for presets.db versioning

const kDefaultLocation = <double>[59.42, 24.71];
const kDatabaseName = 'every_door.db';
Expand Down
1 change: 0 additions & 1 deletion lib/screens/browser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ class _BrowserPageState extends ConsumerState<BrowserPage> {
builder: (context) => MapChooserPage(
creating: true,
location: location,
closer: editorMode == EditorMode.micromapping,
),
fullscreenDialog: true,
),
Expand Down
7 changes: 4 additions & 3 deletions lib/screens/editor/map_chooser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart';
class MapChooserPage extends ConsumerStatefulWidget {
final LatLng location;
final bool creating;
final bool closer;

const MapChooserPage({
required this.location,
this.creating = false,
this.closer = false,
});

@override
Expand Down Expand Up @@ -115,6 +113,9 @@ class _MapChooserPageState extends ConsumerState<MapChooserPage> {
final leftHand = ref.watch(editorSettingsProvider).leftHand;
final loc = AppLocalizations.of(context)!;

double initialZoom = ref.watch(zoomProvider);
if (initialZoom < 18) initialZoom = 18;

return Scaffold(
appBar: AppBar(
title: Text(loc.chooseLocation),
Expand All @@ -134,7 +135,7 @@ class _MapChooserPageState extends ConsumerState<MapChooserPage> {
mapController: controller,
options: MapOptions(
initialCenter: widget.location,
initialZoom: widget.closer ? 19.0 : 18.0,
initialZoom: initialZoom,
minZoom: 17.0,
maxZoom: kEditMaxZoom,
initialRotation: ref.watch(rotationProvider),
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Next generation OpenStreetMap amenity mapper
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

# Also update version in constants.dart!
version: 5.3.99+49
version: 5.4.0+50

environment:
sdk: ">=3.3.0 <4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion tools/add_imagery.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def download_imagery():
# We substitute Mapbox imagery with a built-in one.
if imagery['id'] == 'Mapbox':
continue
if imagery.get('category') not in (None, 'photo', 'map'):
if imagery.get('category') not in (None, 'photo', 'map', 'other'):
continue
if imagery.get('country_code') == 'AQ':
continue
Expand Down

0 comments on commit 07c1536

Please sign in to comment.