-
-
Notifications
You must be signed in to change notification settings - Fork 860
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix FileTileProvider to work on the web (#1170)
* fix FileTileProvider to work on the web * export FileTileProvider * Delete Podfile
- Loading branch information
Showing
4 changed files
with
31 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import 'dart:io'; | ||
|
||
import 'package:flutter/widgets.dart'; | ||
|
||
import '../tile_layer.dart'; | ||
import 'tile_provider.dart'; | ||
|
||
/// FileTileProvider | ||
class FileTileProvider extends TileProvider { | ||
const FileTileProvider(); | ||
@override | ||
ImageProvider getImage(Coords<num> coords, TileLayerOptions options) { | ||
return FileImage(File(getTileUrl(coords, options))); | ||
} | ||
} |
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,14 @@ | ||
import 'package:flutter/widgets.dart'; | ||
|
||
import '../tile_layer.dart'; | ||
import 'tile_provider.dart'; | ||
|
||
/// FileTileProvider | ||
class FileTileProvider extends TileProvider { | ||
const FileTileProvider(); | ||
@override | ||
ImageProvider getImage(Coords<num> coords, TileLayerOptions options) { | ||
return NetworkImage(getTileUrl(coords, options)); | ||
} | ||
} |
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