Skip to content
This repository was archived by the owner on Jun 25, 2019. It is now read-only.
This repository was archived by the owner on Jun 25, 2019. It is now read-only.

Cannot see the markers second time. #134

@deligence

Description

@deligence

I'm using this package to display maps on two consecutive pages.
when I open the mapview on first page I'm able to see the markers and then when I open the mapview on next page it also works fine but then when I get back to the first page again and open the mapview then it shows nothing all the markers are gone.
Video for reference

_mapView.show(
          new MapOptions(
            showMyLocationButton: true,
            showCompassButton: true,
            mapViewType: MapViewType.normal,
            showUserLocation: true,
            initialCameraPosition:
                new CameraPosition(new Location(_lat, _lang), 15.0),
            title:
                '_title',
          ),
          toolbarActions: [
            _buildToolBarActionsMaps(),
            ToolbarAction("X", 1),
          ],
        );
        List<Marker> markers = <Marker>[
          new Marker(
              "1",
              "Text",
              _lat,
              _lang,
              color: Theme.of(context).accentColor,
              markerIcon: new MarkerIcon('assets/marker.png',
                  height: 80.0, width: 80.0)),
        ];
         StreamSubscription sub = _mapView.onMapReady.listen((_) {
          // setState(() {
            _mapView.setMarkers(markers);
          // });
        });                                             
   compositeSubscription.add(sub);
      sub = _mapView.onToolbarAction.listen((id) {
        if (id == 1) {
          _mapView.dismiss();
          compositeSubscription.cancel();
        }
      });
      compositeSubscription.add(sub);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions