Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: support of solid, dotted, dashed styles for polygons, with optimized rendering #1865

Merged
merged 8 commits into from
Apr 10, 2024
8 changes: 4 additions & 4 deletions example/lib/pages/polygon.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ class _PolygonPageState extends State<PolygonPage> {
LatLng(46.22, -0.11),
LatLng(44.399, 1.76),
],
isDotted: true,
pattern: StrokePattern.dashed(segments: const [50, 20]),
borderStrokeWidth: 4,
borderColor: Colors.lightBlue,
color: Colors.yellow,
hitValue: (
title: 'Polygon With Dotted Borders',
title: 'Polygon With Dashed Borders',
subtitle: '...',
),
),
Expand Down Expand Up @@ -105,7 +105,7 @@ class _PolygonPageState extends State<PolygonPage> {
LatLng(54, -14),
LatLng(54, -18),
].map((latlng) => LatLng(latlng.latitude, latlng.longitude + 8)).toList(),
isDotted: true,
pattern: const StrokePattern.dotted(),
holePointsList: [
const [
LatLng(52, -17),
Expand Down Expand Up @@ -151,7 +151,7 @@ class _PolygonPageState extends State<PolygonPage> {
]
.map((latlng) => LatLng(latlng.latitude - 6, latlng.longitude + 8))
.toList(),
isDotted: true,
pattern: const StrokePattern.dotted(),
holePointsList: [
const [
LatLng(52, -17),
Expand Down
4 changes: 2 additions & 2 deletions example/lib/pages/polyline.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class _PolylinePageState extends State<PolylinePage> {
],
strokeWidth: 10,
color: Colors.orange,
pattern: const PolylinePattern.dotted(
pattern: const StrokePattern.dotted(
spacingFactor: 3,
),
borderStrokeWidth: 8,
Expand Down Expand Up @@ -138,7 +138,7 @@ class _PolylinePageState extends State<PolylinePage> {
],
strokeWidth: 6,
color: Colors.green[900]!,
pattern: PolylinePattern.dashed(
pattern: StrokePattern.dashed(
segments: const [50, 20, 30, 20],
),
borderStrokeWidth: 6,
Expand Down
7 changes: 4 additions & 3 deletions lib/flutter_map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ export 'package:flutter_map/src/layer/attribution_layer/rich/source.dart';
export 'package:flutter_map/src/layer/attribution_layer/rich/widget.dart';
export 'package:flutter_map/src/layer/attribution_layer/simple.dart';
export 'package:flutter_map/src/layer/circle_layer/circle_layer.dart';
export 'package:flutter_map/src/layer/general/hit_detection.dart';
export 'package:flutter_map/src/layer/general/mobile_layer_transformer.dart';
export 'package:flutter_map/src/layer/general/translucent_pointer.dart';
export 'package:flutter_map/src/layer/marker_layer/marker_layer.dart';
export 'package:flutter_map/src/layer/misc/hit_detection.dart';
export 'package:flutter_map/src/layer/misc/line_patterns/stroke_pattern.dart';
export 'package:flutter_map/src/layer/misc/mobile_layer_transformer.dart';
export 'package:flutter_map/src/layer/misc/translucent_pointer.dart';
export 'package:flutter_map/src/layer/overlay_image_layer/overlay_image_layer.dart';
export 'package:flutter_map/src/layer/polygon_layer/polygon_layer.dart';
export 'package:flutter_map/src/layer/polyline_layer/polyline_layer.dart';
Expand Down
Loading
Loading