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: [
|
||||
TileLayer(
|
||||
urlTemplate:
|
||||
'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
// It's OK to leave default UA for dev; production
|
||||
// should set `userAgentPackageName` per OSMTOS.
|
||||
'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
// Per OSM tile usage policy: set a User-Agent that
|
||||
// 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 (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