Skip to content

iconAnchor & iconOrigin not work since 7.0.1 #150

@boblepepeur

Description

@boblepepeur

Bug Report

iconAnchor & iconOrigin & snippet on marker not work since 7.0.1

Plugin(s)

capacitor-google-maps

Capacitor Version

Latest Dependencies:

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

Installed Dependencies:

  @capacitor/android: not installed
  @capacitor/ios: not installed
  @capacitor/cli: 7.4.4
  @capacitor/core: 7.4.4

Platform(s)

Web

Current Behavior

add custom marker with iconUrl, set iconAnchor or iconOrigin, the marker dont move on map

Expected Behavior

iconAnchor need to add padding on the icon

Code Reproduction

const markerId = await this.map.addMarker({
                coordinate: coord,
                title: `Vertex ${i + 1}`,
                draggable: true,
                iconUrl: "assets/markers/draw-marker.png",
                iconSize: { width: 20, height: 20 },
                iconAnchor: { x: 8, y: 8 },
                iconOrigin: { x: 0, y: 0 }
            });
            this.vertexMarkers.push({ id: markerId, index: i });

Other Technical Details

Additional Context

It work on 7.0.0 version of the plugin
Problem come from this commit -> plugin/src/web.ts arround ligne 600

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