Skip to content

Commit 1538536

Browse files
Merge pull request #1297 from syncfusion-content/FLUT-965286-UG-maps-hotfix
FLUT-965286 - [Feature] Updated ug pages for maps widget in hotfix branch.
2 parents 02b6771 + 27c6166 commit 1538536

File tree

10 files changed

+73
-75
lines changed

10 files changed

+73
-75
lines changed

Flutter/maps/accessibility.md

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -16,48 +16,46 @@ The [`SfMaps`](https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps
1616
{% tabs %}
1717
{% highlight Dart %}
1818

19-
late List<PopulationModel> _data;
20-
late MapShapeSource _dataSource;
21-
late String _semanticLabel = 'Asia is the most populated continent and Australia is the least populated continent';
22-
23-
@override
24-
void initState() {
25-
_data = const <PopulationModel>[
26-
PopulationModel('Asia', 456.07),
27-
PopulationModel('Africa', 121.61),
28-
PopulationModel('Europe', 74.64),
29-
PopulationModel('North America', 57.9),
30-
PopulationModel('South America', 42.25),
31-
PopulationModel('Australia', 2.54),
32-
];
33-
34-
_dataSource = MapShapeSource.asset(
35-
'assets/world_map.json',
36-
shapeDataField: 'continent',
37-
dataCount: _data.length,
38-
primaryValueMapper: (int index) => _data[index].continent,
39-
);
40-
super.initState();
41-
}
42-
43-
@override
44-
Widget build(BuildContext context) {
45-
return Scaffold(
46-
body: Center(
19+
late List<PopulationModel> _data;
20+
late MapShapeSource _dataSource;
21+
late String _semanticLabel = 'Asia is the most populated continent and Australia is the least populated continent';
22+
23+
@override
24+
void initState() {
25+
_data = const <PopulationModel>[
26+
PopulationModel('Asia', 456.07),
27+
PopulationModel('Africa', 121.61),
28+
PopulationModel('Europe', 74.64),
29+
PopulationModel('North America', 57.9),
30+
PopulationModel('South America', 42.25),
31+
PopulationModel('Australia', 2.54),
32+
];
33+
34+
_dataSource = MapShapeSource.asset(
35+
'assets/world_map.json',
36+
shapeDataField: 'continent',
37+
dataCount: _data.length,
38+
primaryValueMapper: (int index) => _data[index].continent,
39+
);
40+
super.initState();
41+
}
42+
43+
@override
44+
Widget build(BuildContext context) {
45+
return Scaffold(
46+
body: Center(
4747
child: Semantics(
4848
label: 'Syncfusion Flutter Maps',
4949
value: _semanticLabel,
5050
child: SfMaps(
5151
layers: <MapLayer>[
52-
MapShapeLayer(
53-
source: _dataSource,
54-
),
55-
],
52+
MapShapeLayer(source: _dataSource)
53+
]
5654
),
5755
),
5856
),
59-
);
60-
}
57+
);
58+
}
6159

6260
class PopulationModel {
6361
const PopulationModel(this.continent, this.populationInCrores);

Flutter/maps/data-labels.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class Model {
117117

118118
## Overflow mode
119119

120-
You can trim or remove the data label when it is overflowed from the shape using the [`MapDataLabelSettings.overflowMode`](https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapDataLabelSettings/overflowMode.html) property. The possible values are `visible`, `ellipsis`, and `hide`. The default value of the [`overflowMode`](https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapDataLabelSettings/overflowMode.html) property is `MapLabelOverflow.visible`.
120+
You can trim or remove the data label when it is overflowed from the shape using the [`MapDataLabelSettings.overflowMode`](https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapDataLabelSettings/overflowMode.html) property. The possible values are [`visible`](https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapLabelOverflow.html#visible), [`ellipsis`](https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapLabelOverflow.html#ellipsis), and [`hide`](https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapLabelOverflow.html#hide). The default value of the [`overflowMode`](https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapDataLabelSettings/overflowMode.html) property is [`MapLabelOverflow.visible`](https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapLabelOverflow.html#visible).
121121

122122
By default, the data labels will render even if they overflows from the shape.
123123

@@ -141,10 +141,10 @@ void initState() {
141141

142142
dataSource = MapShapeSource.asset(
143143
'assets/australia.json',
144-
shapeDataField: 'STATE_NAME',
145-
dataCount: data.length,
146-
primaryValueMapper: (int index) => data[index].state,
147-
dataLabelMapper: (int index) => data[index].dataLabel,
144+
shapeDataField: 'STATE_NAME',
145+
dataCount: data.length,
146+
primaryValueMapper: (int index) => data[index].state,
147+
dataLabelMapper: (int index) => data[index].dataLabel,
148148
);
149149
super.initState();
150150
}
@@ -206,11 +206,11 @@ void initState() {
206206
];
207207

208208
dataSource = MapShapeSource.asset(
209-
'assets/australia.json',
210-
shapeDataField: 'STATE_NAME',
211-
dataCount: data.length,
212-
primaryValueMapper: (int index) => data[index].state,
213-
dataLabelMapper: (int index) => data[index].dataLabel,
209+
'assets/australia.json',
210+
shapeDataField: 'STATE_NAME',
211+
dataCount: data.length,
212+
primaryValueMapper: (int index) => data[index].state,
213+
dataLabelMapper: (int index) => data[index].dataLabel,
214214
);
215215
super.initState();
216216
}

0 commit comments

Comments
 (0)