Skip to content

[google_maps_flutter] zIndex is silently truncated on iOS #155897

@Hari-07

Description

@Hari-07

What package does this bug report belong to?

google_maps_flutter

What target platforms are you seeing this bug on?

iOS

Have you already upgraded your packages?

Yes

Dependency versions

pubspec.lock
[Paste file content here]

Steps to reproduce

  1. Copy paste the code and open it

Expected results

The marker with the higher zIndex should be drawn above the other

Actual results

The marker thats second in the array is drawn above

Code sample

Code sample
class MapZIndexExample extends StatelessWidget {
  const MapZIndexExample({super.key});

  @override
  Widget build(BuildContext context) {
    return GoogleMap(
      compassEnabled: false,
      initialCameraPosition: const CameraPosition(
        target: LatLng(37.334542, -122.009325),
        zoom: 12,
      ),
      myLocationButtonEnabled: false,
      zoomControlsEnabled: false,
      minMaxZoomPreference: const MinMaxZoomPreference(3, 20),
      markers: {
        const Marker(
          markerId: MarkerId('1'),
          position: LatLng(37.334542, -122.014325),
          zIndex: 3.7,
        ),
        const Marker(
          markerId: MarkerId('2'),
          position: LatLng(37.334542, -122.009325),
          zIndex: 3.5,
        ),
      },
    );
  }
}

Screenshots or Videos

Screenshots / Video demonstration

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[Paste your output here]

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listp: mapsGoogle Maps pluginpackageflutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions