-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
43 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
export 'package:mbtiles/mbtiles.dart'; | ||
|
||
export 'src/raster_mbtiles_provider.dart'; | ||
export 'src/mbtiles_tile_provider.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import 'package:flutter/widgets.dart'; | ||
import 'package:flutter_map/flutter_map.dart'; | ||
import 'package:flutter_map_mbtiles/src/mbtiles_image_provider.dart'; | ||
import 'package:mbtiles/mbtiles.dart'; | ||
|
||
/// MBTiles raster [TileProvider], use for `png`, `jpg` or `webp` tiles. | ||
class MbTilesTileProvider extends TileProvider { | ||
/// MBTiles database | ||
final MBTiles mbtiles; | ||
|
||
/// Create a new [MbTilesTileProvider] instance with an MBTiles instance. | ||
MbTilesTileProvider({required this.mbtiles}); | ||
|
||
/// Create a new [MbTilesTileProvider] instance by providing the path of the | ||
/// MBTiles file. | ||
/// The MBTiles database will be opened internally. | ||
MbTilesTileProvider.fromPath({required String path}) | ||
: mbtiles = MBTiles(mbtilesPath: path); | ||
|
||
@override | ||
ImageProvider getImage(TileCoordinates coordinates, TileLayer options) => | ||
MbTilesImageProvider( | ||
coordinates: coordinates, | ||
mbtiles: mbtiles, | ||
); | ||
|
||
@override | ||
void dispose() { | ||
mbtiles.dispose(); | ||
super.dispose(); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
## 1.0.0 | ||
## 0.1.0 | ||
|
||
- Initial release | ||
- Add `PmTilesVectorTileProvider` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters