Latest source merged from Syncfusion
|
@ -25,7 +25,7 @@ The section contains the GitHub link for each widget’s code examples. This is
|
|||
</tr>
|
||||
<tr>
|
||||
|
||||
<td rowspan="12">
|
||||
<td rowspan="13">
|
||||
|
||||
<p>Data Visualization</p>
|
||||
</td>
|
||||
|
@ -86,7 +86,6 @@ The section contains the GitHub link for each widget’s code examples. This is
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td><p><a href="https://help.syncfusion.com/flutter/maps/overview">Maps</a></p></td>
|
||||
<td><p><a href="https://github.com/syncfusion/flutter-examples/tree/master/lib/samples/maps">samples/maps</a></p></td>
|
||||
|
|
|
@ -27,7 +27,7 @@ This section provides the user guide link for each widget and its package link.
|
|||
</tr>
|
||||
<tr>
|
||||
|
||||
<td rowspan="12">
|
||||
<td rowspan="13">
|
||||
<p>Data Visualization</p>
|
||||
</td>
|
||||
<td><p><a href="https://help.syncfusion.com/flutter/barcode/overview">Barcode</a></p></td>
|
||||
|
@ -86,7 +86,6 @@ This section provides the user guide link for each widget and its package link.
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td><p><a href="https://help.syncfusion.com/flutter/maps/overview">Maps</a></p></td>
|
||||
<td><p><a href="https://pub.dev/packages/syncfusion_flutter_maps">syncfusion_flutter_maps</a></p></td>
|
||||
|
|
Двоичные данные
Flutter/maps/images/title/alignment.png
До Ширина: | Высота: | Размер: 55 KiB |
Двоичные данные
Flutter/maps/images/title/background_color.png
До Ширина: | Высота: | Размер: 57 KiB |
Двоичные данные
Flutter/maps/images/title/decoration.png
До Ширина: | Высота: | Размер: 58 KiB |
Двоичные данные
Flutter/maps/images/title/default_title.png
До Ширина: | Высота: | Размер: 54 KiB |
Двоичные данные
Flutter/maps/images/title/margin.png
До Ширина: | Высота: | Размер: 57 KiB |
Двоичные данные
Flutter/maps/images/title/padding.png
До Ширина: | Высота: | Размер: 57 KiB |
Двоичные данные
Flutter/maps/images/title/textStyle.png
До Ширина: | Высота: | Размер: 55 KiB |
|
@ -18,7 +18,7 @@ You can show shape legend by setting the [`MapShapeLayer.legend`](https://pub.de
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapShapeSource _shapeSource;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -34,7 +34,7 @@ void initState() {
|
|||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: Container(
|
||||
child: SizedBox(
|
||||
height: 350,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 15, right: 15),
|
||||
|
@ -67,8 +67,8 @@ You can show bubble legend by setting the [`MapShapeLayer.legend`](https://pub.d
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<Model> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -137,7 +137,7 @@ You can show bar shape legend by setting the [`MapShapeLayer.legend`](https://pu
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapShapeSource _shapeSource;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -186,8 +186,8 @@ You can show bar bubble legend by setting the [`MapShapeLayer.legend`](https://p
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<Model> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -258,8 +258,8 @@ N> It is applicable for both shape and bar legend.
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapShapeSource _dataSource;
|
||||
List<DataModel> _data;
|
||||
late MapShapeSource _dataSource;
|
||||
late List<DataModel> _data;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -323,8 +323,8 @@ The icons color of the legend is applied based on the colors returned from the [
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<Model> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -393,8 +393,8 @@ You can customize the first segment label of the legend using the [`MapColorMapp
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<DataModel> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<DataModel> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -469,8 +469,8 @@ You can position the legend items in different directions using the [`MapLegend.
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<Model> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -558,8 +558,8 @@ If the property [`MapLegend.offset`](https://pub.dev/documentation/syncfusion_fl
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<Model> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -647,8 +647,8 @@ If the legend position is `top` or `bottom`, then the default scroll direction i
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<Model> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -736,8 +736,8 @@ If the legend position is `top` or `bottom`, then the default scroll direction i
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<Model> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -832,8 +832,8 @@ You can enable toggling the legend items and the corresponding shapes or bubbles
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<Model> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -923,8 +923,8 @@ N> You must import the `theme.dart` library from the [`Core`](https://pub.dev/pa
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<Model> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -1014,8 +1014,8 @@ You can customize the legend item's text style using the [`MapLegend.textStyle`]
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<Model> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -1104,8 +1104,8 @@ N> You must import the `theme.dart` library from the [`Core`](https://pub.dev/pa
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<Model> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -1203,8 +1203,8 @@ You can customize the legend items using the following properties.
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<Model> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -1296,8 +1296,8 @@ You can set solid color for the bar by using the [MapLegendPaintingStyle.solid](
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<Model> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -1380,8 +1380,8 @@ You can set gradient color for the bar by using the [MapLegendPaintingStyle.grad
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<Model> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -1469,8 +1469,8 @@ You can customize the legend items using the following properties.
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<Model> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -1556,8 +1556,8 @@ The labels are positioned between the segments when setting range color mapper w
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<Model> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -1629,8 +1629,8 @@ The labels are positioned between the segments when setting range color mapper a
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<Model> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -1700,8 +1700,8 @@ The labels are positioned at the center of the segments when setting the [`label
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<Model> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -1774,8 +1774,8 @@ The `labelsPlacement` option is not applicable for the shape/bubble applied with
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> _data;
|
||||
MapShapeSource _dataSource;
|
||||
late List<Model> _data;
|
||||
late MapShapeSource _dataSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
|
|
@ -22,8 +22,8 @@ N> You must call `setState()` in the [`MapShapeLayer.onSelectionChanged`](https:
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> data;
|
||||
MapShapeSource dataSource;
|
||||
late List<Model> data;
|
||||
late MapShapeSource dataSource;
|
||||
int selectedIndex = 1;
|
||||
|
||||
@override
|
||||
|
@ -101,8 +101,8 @@ You can customize the below appearance of the selected shape.
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> data;
|
||||
MapShapeSource dataSource;
|
||||
late List<Model> data;
|
||||
late MapShapeSource dataSource;
|
||||
int selectedIndex = 5;
|
||||
|
||||
@override
|
||||
|
@ -182,8 +182,8 @@ N> You must import the `theme.dart` library from the [`Core`](https://pub.dev/pa
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> data;
|
||||
MapShapeSource dataSource;
|
||||
late List<Model> data;
|
||||
late MapShapeSource dataSource;
|
||||
int selectedIndex = 5;
|
||||
|
||||
@override
|
||||
|
|
|
@ -20,7 +20,7 @@ The [`shapeDataField`](https://pub.dev/documentation/syncfusion_flutter_maps/lat
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapShapeSource _sublayerSource;
|
||||
late MapShapeSource _sublayerSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -70,8 +70,8 @@ The [`shapeDataField`](https://pub.dev/documentation/syncfusion_flutter_maps/lat
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapShapeSource _shapeSource;
|
||||
MapShapeSource _sublayerSource;
|
||||
late MapShapeSource _shapeSource;
|
||||
late MapShapeSource _sublayerSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -125,8 +125,8 @@ N> It is applicable for both tile layer and shape layer.
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapShapeSource _shapeSource;
|
||||
MapShapeSource _sublayerSource;
|
||||
late MapShapeSource _shapeSource;
|
||||
late MapShapeSource _sublayerSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -178,9 +178,9 @@ You can apply color to the sublayer shape by comparing a value that returns from
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> data;
|
||||
MapShapeSource sublayerDataSource;
|
||||
MapShapeSource shapeDataSource;
|
||||
late List<Model> data;
|
||||
late MapShapeSource sublayerDataSource;
|
||||
late MapShapeSource shapeDataSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -253,9 +253,9 @@ You can apply color to the sublayer shape based on whether the value returned fr
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> data;
|
||||
MapShapeSource sublayerDataSource;
|
||||
MapShapeSource shapeDataSource;
|
||||
late List<Model> data;
|
||||
late MapShapeSource sublayerDataSource;
|
||||
late MapShapeSource shapeDataSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -328,10 +328,10 @@ N> Refer the [`DataLabels`](https://help.syncfusion.com/flutter/maps/data-labels
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapShapeSource _shapeSource;
|
||||
MapShapeSource _sublayerSource;
|
||||
List<DataModel> _sublayerData;
|
||||
MapZoomPanBehavior _zoomPanBehavior;
|
||||
late MapShapeSource _shapeSource;
|
||||
late MapShapeSource _sublayerSource;
|
||||
late List<DataModel> _sublayerData;
|
||||
late MapZoomPanBehavior _zoomPanBehavior;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -421,10 +421,10 @@ N> Refer the [`Bubbles`](https://help.syncfusion.com/flutter/maps/bubble#tooltip
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapShapeSource _shapeSource;
|
||||
MapShapeSource _sublayerSource;
|
||||
List<DataModel> _sublayerData;
|
||||
MapZoomPanBehavior _zoomPanBehavior;
|
||||
late MapShapeSource _shapeSource;
|
||||
late MapShapeSource _sublayerSource;
|
||||
late List<DataModel> _sublayerData;
|
||||
late MapZoomPanBehavior _zoomPanBehavior;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -536,10 +536,10 @@ N> Refer the [`Tooltip`](https://help.syncfusion.com/flutter/maps/tooltip) secti
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapShapeSource _shapeSource;
|
||||
MapShapeSource _sublayerSource;
|
||||
List<DataModel> _sublayerData;
|
||||
MapZoomPanBehavior _zoomPanBehavior;
|
||||
late MapShapeSource _shapeSource;
|
||||
late MapShapeSource _sublayerSource;
|
||||
late List<DataModel> _sublayerData;
|
||||
late MapZoomPanBehavior _zoomPanBehavior;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -650,10 +650,10 @@ N> Refer the [`Shape selection`](https://help.syncfusion.com/flutter/maps/select
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapShapeSource _shapeSource;
|
||||
MapShapeSource _sublayerSource;
|
||||
List<DataModel> _sublayerData;
|
||||
MapZoomPanBehavior _zoomPanBehavior;
|
||||
late MapShapeSource _shapeSource;
|
||||
late MapShapeSource _sublayerSource;
|
||||
late List<DataModel> _sublayerData;
|
||||
late MapZoomPanBehavior _zoomPanBehavior;
|
||||
int _selectedIndex = 0;
|
||||
|
||||
@override
|
||||
|
@ -749,11 +749,11 @@ N>
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapShapeSource _shapeSource;
|
||||
MapShapeSource _sublayerSource;
|
||||
List<DataModel> _sublayerData;
|
||||
MapZoomPanBehavior _zoomPanBehavior;
|
||||
List<MapLatLng> _markerData;
|
||||
late MapShapeSource _shapeSource;
|
||||
late MapShapeSource _sublayerSource;
|
||||
late List<DataModel> _sublayerData;
|
||||
late MapZoomPanBehavior _zoomPanBehavior;
|
||||
late List<MapLatLng> _markerData;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
|
|
@ -18,7 +18,7 @@ You can notify the user that the map is being loaded using the [`MapShapeLayer.l
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapShapeSource dataSource;
|
||||
late MapShapeSource dataSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -66,7 +66,7 @@ You can apply color, stroke color and stroke width to the shapes using the [`Map
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapShapeSource dataSource;
|
||||
late MapShapeSource dataSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -112,7 +112,7 @@ N> You must import the `theme.dart` library from the [`Core`](https://pub.dev/pa
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapShapeSource dataSource;
|
||||
late MapShapeSource dataSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -160,7 +160,7 @@ N> You must import the `theme.dart` library from the [`Core`](https://pub.dev/pa
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapShapeSource dataSource;
|
||||
late MapShapeSource dataSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -208,8 +208,8 @@ N> You can show legend using the [`MapShapeLayer.legend`](https://pub.dev/docume
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> data;
|
||||
MapShapeSource dataSource;
|
||||
late List<Model> data;
|
||||
late MapShapeSource dataSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -271,8 +271,8 @@ You can apply color to the shape by comparing a value that returns from the [`sh
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> data;
|
||||
MapShapeSource dataSource;
|
||||
late List<Model> data;
|
||||
late MapShapeSource dataSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -333,8 +333,8 @@ You can apply color to the shape based on whether the value returned from [`shap
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> data;
|
||||
MapShapeSource dataSource;
|
||||
late List<Model> data;
|
||||
late MapShapeSource dataSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -393,8 +393,8 @@ The shapes or bubbles with lowest value which is [`from`](https://pub.dev/docume
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> data;
|
||||
MapShapeSource dataSource;
|
||||
late List<Model> data;
|
||||
late MapShapeSource dataSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
|
|
@ -68,7 +68,7 @@ Widget build(BuildContext context) {
|
|||
return SfMaps(
|
||||
layers: [
|
||||
MapTileLayer(
|
||||
urlTemplate: snapshot.data,
|
||||
urlTemplate: snapshot.data as String,
|
||||
),
|
||||
],
|
||||
);
|
||||
|
|
|
@ -1,457 +0,0 @@
|
|||
---
|
||||
layout: post
|
||||
title: Syncfusion Flutter Maps Title | Syncfusion
|
||||
description: This section describes how to add title in the Flutter maps and how to customize its appearance based on the application requirement.
|
||||
platform: Flutter
|
||||
control: SfMaps
|
||||
documentation: ug
|
||||
---
|
||||
|
||||
# Title features in Flutter maps
|
||||
|
||||
This section helps to learn about how to add title in the maps and customize them.
|
||||
|
||||
## Title text
|
||||
|
||||
You can define the maps title using [`SfMaps.title`](https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/SfMaps/title.html) property. You can set the text for the title using the [`MapsTitle.text`](https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapTitle/text.html) property.
|
||||
|
||||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapShapeSource dataSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
dataSource = MapShapeSource.asset(
|
||||
"assets/world_map.json",
|
||||
shapeDataField: "continent",
|
||||
);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: Container(
|
||||
height: 350,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(left: 15, right: 15),
|
||||
child: SfMaps(
|
||||
title: MapTitle('World Map'),
|
||||
layers: [
|
||||
MapShapeLayer(
|
||||
source: dataSource,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
{% endhighlight %}
|
||||
{% endtabs %}
|
||||
|
||||
![Maps title support](images/title/default_title.png)
|
||||
|
||||
## Text style
|
||||
|
||||
You can change the style of the title text in the maps using the [`MapsTitle.textStyle`](https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapTitle/textStyle.html) property.
|
||||
|
||||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapShapeSource dataSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
dataSource = MapShapeSource.asset(
|
||||
"assets/world_map.json",
|
||||
shapeDataField: "continent",
|
||||
);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: Container(
|
||||
height: 350,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(left: 15, right: 15),
|
||||
child: SfMaps(
|
||||
title: MapTitle(
|
||||
'World Map',
|
||||
textStyle: const TextStyle(
|
||||
color: Colors.red,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontStyle: FontStyle.italic,
|
||||
fontFamily: 'Times',
|
||||
),
|
||||
),
|
||||
layers: [
|
||||
MapShapeLayer(
|
||||
source: dataSource,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
{% endhighlight %}
|
||||
{% endtabs %}
|
||||
|
||||
<b>Using SfMapsTheme</b>
|
||||
|
||||
You can also change the style of the title text in the maps using the [`SfMapsThemeData.titleTextStyle`](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfMapsThemeData/titleTextStyle.html) property.
|
||||
|
||||
N> You must import the `theme.dart` library from the [`Core`](https://pub.dev/packages/syncfusion_flutter_core) package to use [`SfMapsTheme`](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfMapsTheme-class.html).
|
||||
|
||||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapShapeSource dataSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
dataSource = MapShapeSource.asset(
|
||||
"assets/world_map.json",
|
||||
shapeDataField: "continent",
|
||||
);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: Container(
|
||||
height: 350,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(left: 15, right: 15),
|
||||
child: SfMapsTheme(
|
||||
data: SfMapsThemeData(
|
||||
titleTextStyle: const TextStyle(
|
||||
color: Colors.red,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontStyle: FontStyle.italic,
|
||||
fontFamily: 'Times'),
|
||||
),
|
||||
child: SfMaps(
|
||||
title: MapTitle('World Map'),
|
||||
layers: [
|
||||
MapShapeLayer(source: dataSource),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
{% endhighlight %}
|
||||
{% endtabs %}
|
||||
|
||||
![Maps title textStyle](images/title/textStyle.png)
|
||||
|
||||
## Text alignment
|
||||
|
||||
You can align the title text in the maps using the [`MapsTitle.alignment`](https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapTitle/alignment.html) property. By default, the alignment will be center. You can also align the text in the available alignment options in [`Alignment`](https://api.flutter.dev/flutter/painting/Alignment-class.html).
|
||||
|
||||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapShapeSource dataSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
dataSource = MapShapeSource.asset(
|
||||
"assets/world_map.json",
|
||||
shapeDataField: "continent",
|
||||
);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: Container(
|
||||
height: 350,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(left: 15, right: 15),
|
||||
child: SfMaps(
|
||||
title: MapTitle(
|
||||
'World Map',
|
||||
textStyle: const TextStyle(
|
||||
color: Colors.red,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontStyle: FontStyle.italic,
|
||||
fontFamily: 'Times',
|
||||
),
|
||||
alignment: Alignment.centerLeft,
|
||||
),
|
||||
layers: [
|
||||
MapShapeLayer(
|
||||
source: dataSource,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
{% endhighlight %}
|
||||
{% endtabs %}
|
||||
|
||||
![Maps title alignment](images/title/alignment.png)
|
||||
|
||||
## Background color
|
||||
|
||||
You can change the background color of the title in the maps using the [`MapsTitle.color`](https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapTitle/color.html).
|
||||
|
||||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapShapeSource dataSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
dataSource = MapShapeSource.asset(
|
||||
"assets/world_map.json",
|
||||
shapeDataField: "continent",
|
||||
);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: Container(
|
||||
height: 350,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(left: 15, right: 15),
|
||||
child: SfMaps(
|
||||
title: MapTitle(
|
||||
'World Map',
|
||||
textStyle: const TextStyle(
|
||||
color: Colors.red,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontStyle: FontStyle.italic,
|
||||
fontFamily: 'Times',
|
||||
),
|
||||
color: Colors.lightBlueAccent,
|
||||
),
|
||||
layers: [
|
||||
MapShapeLayer(
|
||||
source: dataSource,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
{% endhighlight %}
|
||||
{% endtabs %}
|
||||
|
||||
![Maps title background color](images/title/background_color.png)
|
||||
|
||||
## Decoration
|
||||
|
||||
You can decorate the title of maps using the [`MapsTitle.decoration`](https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapTitle/decoration.html) property. You can use [`BoxDecoration`](https://api.flutter.dev/flutter/painting/BoxDecoration-class.html), [`ShapeDecoration`](https://api.flutter.dev/flutter/painting/ShapeDecoration-class.html) or create a custom [`Decoration`](https://api.flutter.dev/flutter/painting/Decoration-class.html).
|
||||
|
||||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapShapeSource dataSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
dataSource = MapShapeSource.asset(
|
||||
"assets/world_map.json",
|
||||
shapeDataField: "continent",
|
||||
);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: Container(
|
||||
height: 350,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(left: 15, right: 15),
|
||||
child: SfMaps(
|
||||
title: MapTitle(
|
||||
'World Map',
|
||||
textStyle: const TextStyle(
|
||||
color: Colors.red,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontStyle: FontStyle.italic,
|
||||
fontFamily: 'Times'
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.lightBlueAccent,
|
||||
border: Border.all(color: Colors.red, width: 2),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(4)),
|
||||
shape: BoxShape.rectangle,
|
||||
),
|
||||
),
|
||||
layers: [
|
||||
MapShapeLayer(
|
||||
source: dataSource,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
{% endhighlight %}
|
||||
{% endtabs %}
|
||||
|
||||
![Maps title decoration](images/title/decoration.png)
|
||||
|
||||
## Margin
|
||||
|
||||
You can add margin to the maps title using the [`MapsTitle.margin`](https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapTitle/margin.html) property.
|
||||
|
||||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapShapeSource dataSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
dataSource = MapShapeSource.asset(
|
||||
"assets/world_map.json",
|
||||
shapeDataField: "continent",
|
||||
);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: Container(
|
||||
height: 350,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(left: 15, right: 15),
|
||||
child: SfMaps(
|
||||
title: MapTitle(
|
||||
'World Map',
|
||||
textStyle: const TextStyle(
|
||||
color: Colors.red,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontStyle: FontStyle.italic,
|
||||
fontFamily: 'Times'
|
||||
),
|
||||
margin: const EdgeInsets.only(top: 50),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.lightBlueAccent,
|
||||
border: Border.all(color: Colors.red, width: 2),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(4)),
|
||||
shape: BoxShape.rectangle,
|
||||
),
|
||||
),
|
||||
layers: [
|
||||
MapShapeLayer(
|
||||
source: dataSource,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
{% endhighlight %}
|
||||
{% endtabs %}
|
||||
|
||||
![Maps title margin support](images/title/margin.png)
|
||||
|
||||
## Padding
|
||||
|
||||
You can add padding to the maps title using the [`MapsTitle.padding`](https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapTitle/padding.html) property.
|
||||
|
||||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapShapeSource dataSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
dataSource = MapShapeSource.asset(
|
||||
"assets/world_map.json",
|
||||
shapeDataField: "continent",
|
||||
);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: Container(
|
||||
height: 350,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(left: 15, right: 15),
|
||||
child: SfMaps(
|
||||
title: MapTitle(
|
||||
'World Map',
|
||||
textStyle: const TextStyle(
|
||||
color: Colors.red,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontStyle: FontStyle.italic,
|
||||
fontFamily: 'Times'
|
||||
),
|
||||
margin: const EdgeInsets.all(10),
|
||||
padding: const EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.lightBlueAccent,
|
||||
border: Border.all(color: Colors.red, width: 2),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(4)),
|
||||
shape: BoxShape.rectangle,
|
||||
),
|
||||
),
|
||||
layers: [
|
||||
MapShapeLayer(
|
||||
source: dataSource,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
{% endhighlight %}
|
||||
{% endtabs %}
|
||||
|
||||
![Maps title padding support](images/title/padding.png)
|
|
@ -20,8 +20,8 @@ The [`MapShapeLayer.shapeTooltipBuilder`](https://pub.dev/documentation/syncfusi
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<Model> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -69,7 +69,7 @@ Widget build(BuildContext context) {
|
|||
color: Colors.white,
|
||||
fontSize: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyText2
|
||||
.bodyText2!
|
||||
.fontSize),
|
||||
),
|
||||
),
|
||||
|
@ -90,7 +90,7 @@ Widget build(BuildContext context) {
|
|||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize:
|
||||
Theme.of(context).textTheme.bodyText2.fontSize),
|
||||
Theme.of(context).textTheme.bodyText2!.fontSize),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -132,8 +132,8 @@ The [MapShapeLayer.bubbleTooltipBuilder](https://pub.dev/documentation/syncfusio
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<Model> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -182,7 +182,7 @@ Widget build(BuildContext context) {
|
|||
color: Colors.white,
|
||||
fontSize: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyText2
|
||||
.bodyText2!
|
||||
.fontSize),
|
||||
),
|
||||
),
|
||||
|
@ -204,7 +204,7 @@ Widget build(BuildContext context) {
|
|||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize:
|
||||
Theme.of(context).textTheme.bodyText2.fontSize),
|
||||
Theme.of(context).textTheme.bodyText2!.fontSize),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -250,8 +250,8 @@ The [MapLayer.markerTooltipBuilder](https://pub.dev/documentation/syncfusion_flu
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<WorldWonderModel> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<WorldWonderModel> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -337,7 +337,7 @@ Widget build(BuildContext context) {
|
|||
color: Colors.white,
|
||||
fontSize: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyText2
|
||||
.bodyText2!
|
||||
.fontSize),
|
||||
),
|
||||
),
|
||||
|
@ -358,7 +358,7 @@ Widget build(BuildContext context) {
|
|||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize:
|
||||
Theme.of(context).textTheme.bodyText2.fontSize),
|
||||
Theme.of(context).textTheme.bodyText2!.fontSize),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -378,7 +378,10 @@ Widget build(BuildContext context) {
|
|||
|
||||
class WorldWonderModel {
|
||||
const WorldWonderModel(
|
||||
{this.place, this.country, this.latitude, this.longitude});
|
||||
{required this.place,
|
||||
required this.country,
|
||||
required this.latitude,
|
||||
required this.longitude});
|
||||
|
||||
final String place;
|
||||
final String country;
|
||||
|
@ -405,8 +408,8 @@ You can customize the below appearances of the tooltip.
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<Model> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -510,8 +513,8 @@ N> You must import the `theme.dart` library from the [`Core`](https://pub.dev/pa
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
List<Model> _data;
|
||||
MapShapeSource _shapeSource;
|
||||
late List<Model> _data;
|
||||
late MapShapeSource _shapeSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
|
|
@ -18,8 +18,8 @@ The procedure for zooming and panning for both layers is very similar.
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapZoomPanBehavior _zoomPanBehavior;
|
||||
MapShapeSource _dataSource;
|
||||
late MapZoomPanBehavior _zoomPanBehavior;
|
||||
late MapShapeSource _dataSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -53,7 +53,7 @@ Widget build(BuildContext context) {
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapZoomPanBehavior _zoomPanBehavior;
|
||||
late MapZoomPanBehavior _zoomPanBehavior;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -71,7 +71,7 @@ Widget build(BuildContext context) {
|
|||
return SfMaps(
|
||||
layers: [
|
||||
MapTileLayer(
|
||||
urlTemplate: snapshot.data,
|
||||
urlTemplate: snapshot.data as String,
|
||||
zoomPanBehavior: _zoomPanBehavior,
|
||||
),
|
||||
],
|
||||
|
@ -96,7 +96,7 @@ To enable panning, set the instance of [`MapZoomPanBehavior`](https://pub.dev/do
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapZoomPanBehavior _zoomPanBehavior;
|
||||
late MapZoomPanBehavior _zoomPanBehavior;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -116,7 +116,7 @@ Widget build(BuildContext context) {
|
|||
return SfMaps(
|
||||
layers: [
|
||||
MapTileLayer(
|
||||
urlTemplate: snapshot.data,
|
||||
urlTemplate: snapshot.data as String,
|
||||
zoomPanBehavior: _zoomPanBehavior,
|
||||
),
|
||||
],
|
||||
|
@ -141,8 +141,8 @@ N> It is applicable for both shape layer and tile layer.
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapZoomPanBehavior _zoomPanBehavior;
|
||||
MapShapeSource _dataSource;
|
||||
late MapZoomPanBehavior _zoomPanBehavior;
|
||||
late MapShapeSource _dataSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -200,7 +200,7 @@ To enable zooming, set the instance of [`MapZoomPanBehavior`](https://pub.dev/do
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapZoomPanBehavior _zoomPanBehavior;
|
||||
late MapZoomPanBehavior _zoomPanBehavior;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -221,7 +221,7 @@ Widget build(BuildContext context) {
|
|||
return SfMaps(
|
||||
layers: [
|
||||
MapTileLayer(
|
||||
urlTemplate: snapshot.data,
|
||||
urlTemplate: snapshot.data as String,
|
||||
zoomPanBehavior: _zoomPanBehavior,
|
||||
),
|
||||
],
|
||||
|
@ -246,8 +246,8 @@ N> It is applicable for both shape layer and tile layer.
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapZoomPanBehavior _zoomPanBehavior;
|
||||
MapShapeSource _dataSource;
|
||||
late MapZoomPanBehavior _zoomPanBehavior;
|
||||
late MapShapeSource _dataSource;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -302,7 +302,7 @@ However, for [MapTileLayer](https://pub.dev/documentation/syncfusion_flutter_map
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapZoomPanBehavior _zoomPanBehavior;
|
||||
late MapZoomPanBehavior _zoomPanBehavior;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -325,7 +325,7 @@ Widget build(BuildContext context) {
|
|||
return SfMaps(
|
||||
layers: [
|
||||
MapTileLayer(
|
||||
urlTemplate: snapshot.data,
|
||||
urlTemplate: snapshot.data as String,
|
||||
zoomPanBehavior: _zoomPanBehavior,
|
||||
),
|
||||
],
|
||||
|
@ -361,12 +361,12 @@ Whenever zooming happens, this method is called. If it returns false, zooming wi
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapZoomPanBehavior _zoomPanBehavior;
|
||||
late MapZoomPanBehavior _zoomPanBehavior;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_zoomPanBehavior = _CustomZoomPanBehavior();
|
||||
_zoomPanBehavior = MapZoomPanBehavior()
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -379,7 +379,7 @@ Widget build(BuildContext context) {
|
|||
return SfMaps(
|
||||
layers: [
|
||||
MapTileLayer(
|
||||
urlTemplate: snapshot.data,
|
||||
urlTemplate: snapshot.data as String,
|
||||
zoomPanBehavior: _zoomPanBehavior,
|
||||
onWillZoom: (MapZoomDetails detail) {
|
||||
return true;
|
||||
|
@ -411,12 +411,12 @@ Whenever panning happens, this method is called. If it returns false, panning wi
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapZoomPanBehavior _zoomPanBehavior;
|
||||
late MapZoomPanBehavior _zoomPanBehavior;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_zoomPanBehavior = _CustomZoomPanBehavior();
|
||||
_zoomPanBehavior = MapZoomPanBehavior();
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -429,7 +429,7 @@ Widget build(BuildContext context) {
|
|||
return SfMaps(
|
||||
layers: [
|
||||
MapTileLayer(
|
||||
urlTemplate: snapshot.data,
|
||||
urlTemplate: snapshot.data as String,
|
||||
zoomPanBehavior: _zoomPanBehavior,
|
||||
onWillPan: (MapPanDetails detail) {
|
||||
return true;
|
||||
|
@ -465,7 +465,7 @@ Whenever zooming happens, this method is called. Subclasses can override this me
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapZoomPanBehavior _zoomPanBehavior;
|
||||
late MapZoomPanBehavior _zoomPanBehavior;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -483,7 +483,7 @@ Widget build(BuildContext context) {
|
|||
return SfMaps(
|
||||
layers: [
|
||||
MapTileLayer(
|
||||
urlTemplate: snapshot.data,
|
||||
urlTemplate: snapshot.data as String,
|
||||
zoomPanBehavior: _zoomPanBehavior,
|
||||
),
|
||||
],
|
||||
|
@ -525,7 +525,7 @@ Whenever panning happens, this method is called. Subclasses can override this me
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapZoomPanBehavior _zoomPanBehavior;
|
||||
late MapZoomPanBehavior _zoomPanBehavior;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -543,7 +543,7 @@ Widget build(BuildContext context) {
|
|||
return SfMaps(
|
||||
layers: [
|
||||
MapTileLayer(
|
||||
urlTemplate: snapshot.data,
|
||||
urlTemplate: snapshot.data as String,
|
||||
zoomPanBehavior: _zoomPanBehavior,
|
||||
),
|
||||
],
|
||||
|
@ -576,7 +576,7 @@ You can [`reset`](https://pub.dev/documentation/syncfusion_flutter_maps/latest/m
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapZoomPanBehavior _zoomPanBehavior;
|
||||
late MapZoomPanBehavior _zoomPanBehavior;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -596,7 +596,7 @@ Widget build(BuildContext context) {
|
|||
return SfMaps(
|
||||
layers: [
|
||||
MapTileLayer(
|
||||
urlTemplate: snapshot.data,
|
||||
urlTemplate: snapshot.data as String,
|
||||
zoomPanBehavior: _zoomPanBehavior,
|
||||
),
|
||||
],
|
||||
|
@ -625,7 +625,7 @@ You can override this method to handle pointer events that hit this render objec
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapZoomPanBehavior _zoomPanBehavior;
|
||||
late MapZoomPanBehavior _zoomPanBehavior;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -643,7 +643,7 @@ Widget build(BuildContext context) {
|
|||
return SfMaps(
|
||||
layers: [
|
||||
MapTileLayer(
|
||||
urlTemplate: snapshot.data,
|
||||
urlTemplate: snapshot.data as String,
|
||||
zoomPanBehavior: _zoomPanBehavior,
|
||||
),
|
||||
],
|
||||
|
@ -673,7 +673,7 @@ You can paint this render object into the given context at the given offset.
|
|||
{% tabs %}
|
||||
{% highlight Dart %}
|
||||
|
||||
MapZoomPanBehavior _zoomPanBehavior;
|
||||
late MapZoomPanBehavior _zoomPanBehavior;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -691,7 +691,7 @@ Widget build(BuildContext context) {
|
|||
return SfMaps(
|
||||
layers: [
|
||||
MapTileLayer(
|
||||
urlTemplate: snapshot.data,
|
||||
urlTemplate: snapshot.data as String,
|
||||
zoomPanBehavior: _zoomPanBehavior,
|
||||
),
|
||||
],
|
||||
|
|
|
@ -205,7 +205,6 @@
|
|||
<ul>
|
||||
<li><a href="/Flutter/maps/overview">Overview</a></li>
|
||||
<li><a href="/Flutter/maps/getting-started">Getting started</a></li>
|
||||
<li><a href="/Flutter/maps/title">Title</a></li>
|
||||
<li><a href="/Flutter/maps/data-labels">Data labels</a></li>
|
||||
<li><a href="/Flutter/maps/shape">Shape</a></li>
|
||||
<li><a href="/Flutter/maps/legend">Legend</a></li>
|
||||
|
|