Adhere to OpenStreetMap's Policy to avoid blocked tiles
This commit is contained in:
parent
ca195e6326
commit
c64c356c1b
|
|
@ -351,9 +351,12 @@ class _GeofenceTestScreenState extends ConsumerState<GeofenceTestScreen> {
|
||||||
children: [
|
children: [
|
||||||
TileLayer(
|
TileLayer(
|
||||||
urlTemplate:
|
urlTemplate:
|
||||||
'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
// It's OK to leave default UA for dev; production
|
// Per OSM tile usage policy: set a User-Agent that
|
||||||
// should set `userAgentPackageName` per OSMTOS.
|
// identifies this application. Use the Android
|
||||||
|
// applicationId so tile servers can contact the
|
||||||
|
// publisher if necessary.
|
||||||
|
userAgentPackageName: 'com.example.tasq',
|
||||||
),
|
),
|
||||||
if (polygonPoints.isNotEmpty) polygonLayer,
|
if (polygonPoints.isNotEmpty) polygonLayer,
|
||||||
if (cfg?.hasCircle == true) circleLayer,
|
if (cfg?.hasCircle == true) circleLayer,
|
||||||
|
|
@ -427,6 +430,13 @@ class _GeofenceTestScreenState extends ConsumerState<GeofenceTestScreen> {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 6),
|
||||||
|
Text(
|
||||||
|
'Map tiles: © OpenStreetMap contributors',
|
||||||
|
style: Theme.of(
|
||||||
|
context,
|
||||||
|
).textTheme.bodySmall,
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user