Skip to content

Commit

Permalink
update docs, replace links
Browse files Browse the repository at this point in the history
  • Loading branch information
josxha committed Jan 30, 2024
1 parent b44f056 commit 5addd11
Show file tree
Hide file tree
Showing 10 changed files with 498 additions and 1,513 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ A combined example app can be found under

### [flutter_map_cache](https://pub.dev/packages/flutter_map_cache)

A slim yet powerful caching plugin for flutter_map tile layers. Supports any
storage backend you would possibly want.

- This package fills the gap
between [dio_cache_interceptor](https://pub.dev/packages/dio_cache_interceptor)
and flutter_map.
- Support for tile cancellation

### [flutter_map_pmtiles](https://pub.dev/packages/flutter_map_pmtiles)

This package provides the `PmTilesTileProvider` that can be used with
Expand Down
2 changes: 1 addition & 1 deletion example/lib/flutter_map_cache/page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class _FlutterMapCachePageState extends State<FlutterMapCachePage> {
),
],
),
userAgentPackageName: 'com.github.josxha/flutter_map_cache',
userAgentPackageName: 'com.github.josxha/flutter_map_plugins',
),
],
),
Expand Down
12 changes: 7 additions & 5 deletions example/lib/vector_map_tiles_pmtiles/page.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:latlong2/latlong.dart';
import 'package:vector_map_tiles/vector_map_tiles.dart' as vmt;
import 'package:vector_map_tiles/vector_map_tiles.dart';
import 'package:vector_map_tiles_pmtiles/vector_map_tiles.dart';
import 'package:vector_tile_renderer/vector_tile_renderer.dart' as vtr;
import 'package:vector_tile_renderer/vector_tile_renderer.dart';

// It could be that the hosted PMTiles file is no longer available.
// Check https://maps.protomaps.com/builds/ to get an up to date build.
// TODO: use your own tile source https://docs.protomaps.com/pmtiles/cloud-storage
const tileSource = 'https://build.protomaps.com/20240128.pmtiles';

Expand Down Expand Up @@ -33,9 +35,9 @@ class VectorMapTilesPmTilesPage extends StatelessWidget {
maxZoom: 3.49,
),
children: [
vmt.VectorTileLayer(
theme: vtr.ProvidedThemes.lightTheme(),
tileProviders: vmt.TileProviders({
VectorTileLayer(
theme: ProvidedThemes.lightTheme(),
tileProviders: TileProviders({
'openmaptiles': tileProvider,
}),
),
Expand Down
Loading

0 comments on commit 5addd11

Please sign in to comment.