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

#25 use mapbox style for acceptance businesses #34

Merged
merged 3 commits into from
Nov 26, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed frontend/custom_marker.png
Binary file not shown.
17 changes: 1 addition & 16 deletions frontend/lib/map/full_map.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'dart:typed_data';

import 'package:flutter/material.dart';
import 'package:mapbox_gl/mapbox_gl.dart';

Expand All @@ -8,25 +6,12 @@ class FullMapState extends State<FullMap> {

FullMapState(this.mapboxToken);

void loadData(MapboxMapController mapController) async {
String data = await DefaultAssetBundle.of(context)
.loadString("verguenstigungen.json");
ByteData marker =
await DefaultAssetBundle.of(context).load("custom_marker.png");

mapController.addImage('custom-marker', marker.buffer.asUint8List());
mapController.addSource("sourceId", data);
mapController.addSymbolLayer("sourceId", "layer", {
'icon-image': '["image", "custom-marker"]',
});
}

@override
Widget build(BuildContext context) {
return new MapboxMap(
accessToken: this.mapboxToken,
onMapCreated: loadData,
initialCameraPosition: const CameraPosition(target: LatLng(0.0, 0.0)),
styleString: "mapbox://styles/elkei24/ckhyn5h2l1yq519r9g3fbsogj",
);
}
}
Expand Down
2 changes: 0 additions & 2 deletions frontend/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ flutter:
# - images/a_dot_ham.jpeg
assets:
- secrets.json
- verguenstigungen.json
- custom_marker.png

# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
Expand Down
40 changes: 0 additions & 40 deletions frontend/verguenstigungen.json

This file was deleted.