import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:flutter_map_tile_caching/flutter_map_tile_caching.dart';

class BaseLayer extends StatelessWidget {
  const BaseLayer({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return TileLayer(
                    urlTemplate: "https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png",
                    tileProvider: FMTC.instance('OpenStreetMap (A)').getTileProvider(
                              FMTCTileProviderSettings(
                                behavior: CacheBehavior.values
                                    .byName('cacheFirst'),
                                cachedValidDuration: Duration(
                                        days: 14
                                      ),
                              ),
                            ),
                  );
  }
}

// var Esri_WorldImagery = L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
// 	attribution: 'Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
// });