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

Cannot see the markers second time. #134

Open
deligence opened this issue Oct 24, 2018 · 2 comments
Open

Cannot see the markers second time. #134

deligence opened this issue Oct 24, 2018 · 2 comments

Comments

@deligence
Copy link

deligence commented Oct 24, 2018

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);
@deligence deligence reopened this Oct 25, 2018
@nitneuq33000
Copy link

Perfect demo of my problem... :( please find a solution

@nitneuq33000
Copy link

I don't know if it's the same issue but when I press on back button of my android device to close map . tags are removed after re open the map

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants