-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Implementation - [x] android integration - [x] web integration - [x] public API - [x] example app - [x] changelog - [x] update docs ## Events - [x] map created - [x] style loaded - [x] clicked - [x] long clicked - [x] secondary clicked - [x] double clicked - [x] camera changed More events can be added later. ## Resources - https://maplibre.org/maplibre-gl-js/docs/API/type-aliases/MapEventType/ - https://maplibre.org/maplibre-native/android/api/-map-libre%20-native%20-android/org.maplibre.android.maps/-map-view/index.html
- Loading branch information
Showing
51 changed files
with
995 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"label": "Layers", | ||
"position": 5, | ||
"link": { | ||
"type": "generated-index", | ||
"description": "Add or remove layers from the active map style." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
sidebar_position: 1 | ||
description: 'Add Circles to the map.' | ||
--- | ||
|
||
# Circle Layer | ||
|
||
The `CircleLayer` is either used by the map style or can be added to the map | ||
programmatically to symbolize data on the map. | ||
|
||
[![Circle Layer](/img/layers/circle_layer.jpg)](/demo/#/layers/circle) | ||
|
||
## Basic Usage | ||
|
||
```dart | ||
late final MapController _controller; | ||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: AppBar(title: const Text('Events')), | ||
body: MapLibreMap( | ||
options: MapOptions(center: Position(9.17, 47.68)), | ||
onMapCreated: (controller) => _controller = controller, | ||
onStyleLoaded: () async { | ||
// highlight-start | ||
// add the source | ||
const earthquakes = GeoJsonSource( | ||
id: _sourceId, | ||
data: | ||
'https://maplibre.org/maplibre-gl-js/docs/assets/earthquakes.geojson', | ||
); | ||
await _controller.addSource(earthquakes); | ||
// add the source with a layer on the map | ||
const circleLayer = CircleLayer(id: _layerId, sourceId: _sourceId); | ||
await _controller.addLayer(circleLayer); | ||
// highlight-end | ||
} | ||
), | ||
); | ||
} | ||
``` | ||
|
||
Check out | ||
the [example app](https://github.com/josxha/flutter-maplibre/blob/main/example/lib/layers_circle_page.dart) | ||
for to learn more. | ||
|
||
## Style | ||
|
||
Use the `paint` property to style your `CircleLayer` to change the style of the | ||
map. | ||
|
||
See | ||
the [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/layers/#circle) | ||
for all available properties. | ||
|
||
## Layout | ||
|
||
Use the `layout` property to change how the circles behave on the map. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
sidebar_position: 1 | ||
description: 'Add 3D building outlines to the map.' | ||
--- | ||
|
||
# Fill Extrusion Layer | ||
|
||
The `FillExtrusionLayer` is either used by the map style or can be added to the | ||
map programmatically to symbolize data on the map. | ||
|
||
[![Fill Extrusion Layer](/img/layers/fill_extrusion_layer.jpg)](/demo/#/layers/fill-extrusion) | ||
|
||
## Basic Usage | ||
|
||
Check out | ||
the [example app](https://github.com/josxha/flutter-maplibre/blob/main/example/lib/layers_fill_extrusion_page.dart) | ||
to learn more. | ||
|
||
## Style | ||
|
||
Use the `paint` property to style your `FillExtrusionLayer` to change the style | ||
of the map. | ||
|
||
See | ||
the [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/layers/#fill-extrusion) | ||
for all available properties. | ||
|
||
## Layout | ||
|
||
Use the `layout` property to change how the | ||
fill extrusions behave on the map. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
sidebar_position: 1 | ||
description: 'Add Polygons to the map.' | ||
--- | ||
|
||
# Fill Layer | ||
|
||
The `FillLayer` is either used by the map style or can be added to the map | ||
programmatically to symbolize data on the map. | ||
|
||
[![Fill Layer](/img/layers/fill_layer.jpg)](/demo/#/layers/fill) | ||
|
||
## Basic Usage | ||
|
||
Check out | ||
the [example app](https://github.com/josxha/flutter-maplibre/blob/main/example/lib/layers_fill_page.dart) | ||
to learn more. | ||
|
||
## Style | ||
|
||
Use the `paint` property to style your `FillLayer` to change the style of the | ||
map. | ||
|
||
See | ||
the [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/layers/#fill) | ||
for all available properties. | ||
|
||
## Layout | ||
|
||
Use the `layout` property to change how the fills | ||
behave on the map. |
Oops, something went wrong.