combine martin calls
This commit is contained in:
parent
05e9a9b688
commit
31cfd59b92
3 changed files with 18 additions and 28 deletions
|
|
@ -77,7 +77,9 @@ services:
|
|||
- "3001:3001"
|
||||
environment:
|
||||
DATABASE_URL: "postgres://maps:maps@postgres:5432/maps"
|
||||
command: ["--listen-addresses", "0.0.0.0:3001"]
|
||||
volumes:
|
||||
- ./martin-config.yaml:/config.yaml:ro
|
||||
command: ["--config", "/config.yaml"]
|
||||
depends_on:
|
||||
- postgres
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ const VALID_LAYERS: &[&str] = &[
|
|||
"planet_osm_line",
|
||||
"planet_osm_point",
|
||||
"planet_osm_roads",
|
||||
"osm_all",
|
||||
"pois",
|
||||
];
|
||||
|
||||
|
|
@ -99,27 +100,9 @@ pub async fn get_style(
|
|||
"version": 8,
|
||||
"name": "Privacy Maps",
|
||||
"sources": {
|
||||
"planet_osm_polygon": {
|
||||
"osm_all": {
|
||||
"type": "vector",
|
||||
"tiles": [format!("{base}/tiles/planet_osm_polygon/{{z}}/{{x}}/{{y}}.pbf")],
|
||||
"minzoom": 0,
|
||||
"maxzoom": 14
|
||||
},
|
||||
"planet_osm_line": {
|
||||
"type": "vector",
|
||||
"tiles": [format!("{base}/tiles/planet_osm_line/{{z}}/{{x}}/{{y}}.pbf")],
|
||||
"minzoom": 0,
|
||||
"maxzoom": 14
|
||||
},
|
||||
"planet_osm_point": {
|
||||
"type": "vector",
|
||||
"tiles": [format!("{base}/tiles/planet_osm_point/{{z}}/{{x}}/{{y}}.pbf")],
|
||||
"minzoom": 0,
|
||||
"maxzoom": 14
|
||||
},
|
||||
"planet_osm_roads": {
|
||||
"type": "vector",
|
||||
"tiles": [format!("{base}/tiles/planet_osm_roads/{{z}}/{{x}}/{{y}}.pbf")],
|
||||
"tiles": [format!("{base}/tiles/osm_all/{{z}}/{{x}}/{{y}}.pbf")],
|
||||
"minzoom": 0,
|
||||
"maxzoom": 14
|
||||
}
|
||||
|
|
@ -127,24 +110,24 @@ pub async fn get_style(
|
|||
"layers": [
|
||||
{ "id": "background", "type": "background",
|
||||
"paint": { "background-color": "#f0ebe3" } },
|
||||
{ "id": "landuse", "type": "fill", "source": "planet_osm_polygon",
|
||||
{ "id": "landuse", "type": "fill", "source": "osm_all",
|
||||
"source-layer": "planet_osm_polygon",
|
||||
"paint": { "fill-color": "#d4e5c9", "fill-opacity": 0.6 } },
|
||||
{ "id": "water", "type": "fill", "source": "planet_osm_polygon",
|
||||
{ "id": "water", "type": "fill", "source": "osm_all",
|
||||
"source-layer": "planet_osm_polygon",
|
||||
"filter": ["==", "natural", "water"],
|
||||
"paint": { "fill-color": "#a0c8f0" } },
|
||||
{ "id": "roads-minor", "type": "line", "source": "planet_osm_line",
|
||||
{ "id": "roads-minor", "type": "line", "source": "osm_all",
|
||||
"source-layer": "planet_osm_line",
|
||||
"paint": { "line-color": "#ccc", "line-width": 1 } },
|
||||
{ "id": "roads-main", "type": "line", "source": "planet_osm_roads",
|
||||
{ "id": "roads-main", "type": "line", "source": "osm_all",
|
||||
"source-layer": "planet_osm_roads",
|
||||
"paint": { "line-color": "#f5a623", "line-width": 2 } },
|
||||
{ "id": "buildings", "type": "fill", "source": "planet_osm_polygon",
|
||||
{ "id": "buildings", "type": "fill", "source": "osm_all",
|
||||
"source-layer": "planet_osm_polygon",
|
||||
"filter": ["has", "building"],
|
||||
"paint": { "fill-color": "#d9d0c7", "fill-outline-color": "#bbb" } },
|
||||
{ "id": "road-names", "type": "symbol", "source": "planet_osm_line",
|
||||
{ "id": "road-names", "type": "symbol", "source": "osm_all",
|
||||
"source-layer": "planet_osm_line",
|
||||
"minzoom": 13,
|
||||
"filter": ["has", "name"],
|
||||
|
|
@ -162,7 +145,7 @@ pub async fn get_style(
|
|||
"text-halo-width": 1.5
|
||||
}
|
||||
},
|
||||
{ "id": "place-names", "type": "symbol", "source": "planet_osm_point",
|
||||
{ "id": "place-names", "type": "symbol", "source": "osm_all",
|
||||
"source-layer": "planet_osm_point",
|
||||
"minzoom": 10,
|
||||
"filter": ["all", ["has", "name"], ["has", "place"]],
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_map/flutter_map.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:vector_map_tiles/vector_map_tiles.dart';
|
||||
import '../../../../core/api/api_client.dart';
|
||||
import '../../providers/map_provider.dart';
|
||||
|
|
@ -76,6 +77,10 @@ class _MapScreenState extends ConsumerState<MapScreen> {
|
|||
tileProviders: style.providers,
|
||||
theme: style.theme,
|
||||
concurrency: 4,
|
||||
memoryTileCacheMaxSize: 20 * 1024 * 1024, // 20 MB raw tiles
|
||||
memoryTileDataCacheMaxSize: 50, // 50 parsed tiles
|
||||
fileCacheMaximumSizeInBytes: 50 * 1024 * 1024, // 50 MB on disk
|
||||
cacheFolder: () => getApplicationCacheDirectory(),
|
||||
),
|
||||
loading: () => const SizedBox.shrink(),
|
||||
error: (e, _) => const SizedBox.shrink(),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue