Skip to content

Current location button displaying on Android when enableCurrentLocation true #45

@DevMattersUK

Description

@DevMattersUK

Bug Report

Plugin(s)

@capacitor/[email protected]

Capacitor Version

Latest Dependencies:

  @capacitor/cli: 6.1.2
  @capacitor/core: 6.1.2
  @capacitor/android: 6.1.2
  @capacitor/ios: 6.1.2

Installed Dependencies:

  @capacitor/cli: 6.1.2
  @capacitor/core: 6.1.2
  @capacitor/android: 6.1.2
  @capacitor/ios: 6.1.2

Platform(s)

Android

Current Behavior

Enabling current location on Android also enables the current location button, this does not display on web or iOS and there is no way to disable it.

Expected Behavior

Consistent behaviour between all device types (web/Android/iOS), disabling button or an option to toggle

Code Reproduction

import { GoogleMap } from '@capacitor/google-maps';

const apiKey = 'YOUR_API_KEY_HERE';

const mapRef = document.getElementById('map');

const newMap = await GoogleMap.create({
  id: 'my-map',
  element: mapRef,
  apiKey: apiKey,
  config: {
    center: {
      lat: 33.6,
      lng: -117.9,
    },
    zoom: 7,
  },
});

newMap.enableCurrentLocation(true);

Other Technical Details

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions