mirror of
https://bitbucket.org/FransoletThomas/tablet-app.git
synced 2025-12-06 00:21:19 +00:00
Fixed map issue (filter size + marker Id)
This commit is contained in:
parent
256d29bcad
commit
e17e38e556
@ -51,7 +51,7 @@ class _GoogleMapViewState extends State<GoogleMapView> {
|
||||
if (mapMarker.latitude != null && mapMarker.longitude != null) {
|
||||
markers.add(Marker(
|
||||
draggable: false,
|
||||
markerId: MarkerId(mapMarker.latitude! + mapMarker.longitude!),
|
||||
markerId: MarkerId(parse(textSansHTML.body!.text).documentElement!.text + mapMarker.latitude! + mapMarker.longitude!),
|
||||
position: LatLng(
|
||||
double.tryParse(mapMarker.latitude!)!,
|
||||
double.tryParse(mapMarker.longitude!)!,
|
||||
@ -172,7 +172,7 @@ class _GoogleMapViewState extends State<GoogleMapView> {
|
||||
bottom: 35,
|
||||
left: 10,
|
||||
child: SizedBox(
|
||||
width: size.width * 0.55,
|
||||
width: size.width * 0.75,
|
||||
child: MultiSelectContainer(
|
||||
label: null,
|
||||
color: kBackgroundGrey,
|
||||
@ -183,9 +183,9 @@ class _GoogleMapViewState extends State<GoogleMapView> {
|
||||
var tempOutput = new List<String>.from(value);
|
||||
print(tempOutput);
|
||||
if(init) {
|
||||
selectedCategories = tempOutput;
|
||||
pointsToShow = widget.mapDTO!.points!.where((point) => tempOutput.any((tps) => point.categorie?.label?.firstWhere((lab) => lab.language == widget.language).value == tps) || point.categorie == null).toList();
|
||||
setState(() {
|
||||
selectedCategories = tempOutput;
|
||||
pointsToShow = widget.mapDTO!.points!.where((point) => tempOutput.any((tps) => point.categorie?.label?.firstWhere((lab) => lab.language == widget.language).value == tps) || point.categorie == null).toList();
|
||||
markers = getMarkers(widget.language, mapContext);
|
||||
mapContext.notifyListeners();
|
||||
});
|
||||
|
||||
@ -41,7 +41,7 @@ class AnnotationClickListener extends mapBox.OnPointAnnotationClickListener {
|
||||
@override
|
||||
void onPointAnnotationClick(mapBox.PointAnnotation annotation) {
|
||||
try{
|
||||
var markerToShow = markersList.firstWhere((ml) => ml.id.toString() == annotation.textField);
|
||||
var markerToShow = markersList.firstWhere((ml) => "${ml.title}${ml.latitude}${ml.longitude}" == annotation.textField);
|
||||
mapContext.setSelectedMarker(markerToShow);
|
||||
} catch(e) {
|
||||
print("ISSSUE setSelectedMarker");
|
||||
@ -75,7 +75,7 @@ class _MapBoxViewState extends State<MapBoxView> {
|
||||
double.tryParse(mapMarker.latitude!)!,
|
||||
)).toJson(),
|
||||
iconSize: 1.3,
|
||||
textField: i.toString(),
|
||||
textField: "${parse(textSansHTML.body!.text).documentElement!.text}${mapMarker.latitude}${mapMarker.longitude}",
|
||||
textOpacity: 0.0,
|
||||
iconOffset: [0.0, 0.0],
|
||||
symbolSortKey: 10,
|
||||
@ -176,7 +176,7 @@ class _MapBoxViewState extends State<MapBoxView> {
|
||||
bottom: 35,
|
||||
left: 10,
|
||||
child: SizedBox(
|
||||
width: size.width * 0.55,
|
||||
width: size.width * 0.85,
|
||||
child: MultiSelectContainer(
|
||||
label: null,
|
||||
color: kBackgroundGrey,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user