Skip to content

[Bug]: Compass image doesnt work #4169

@get-Friday

Description

@get-Friday

Mapbox Version

default

React Native Version

0.81.4

Platform

Android

@rnmapbox/maps version

10.1.44

Standalone component to reproduce

I have the following compassImage implementation as I found in documentation and it simply doesnt work.

import React from 'react';
import {
  MapView,
  ShapeSource,
  LineLayer,
  Camera,
} from '@rnmapbox/maps';

const aLine = {
  type: 'LineString',
  coordinates: [
    [-74.00597, 40.71427],
    [-74.00697, 40.71527],
  ],
};

class BugReportExample extends React.Component {
  render() {
    return (
      <MapView style={{flex: 1}} 
        compassEnabled={true}
        compassImage={'compassHeading'}>
        <Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
        <Images
          images={{
            compassHeading: 'https://cdn-icons-png.freepik.com/512/14979/14979943.png', // example image, in my code I used a require(...)
          }}
        />
      </MapView>
    );
  }
}

No error, no warning, just does nothing.

I read some issues (#2402) talking about the impossibility of create custom compass components, but they are from 2022, any update on the matter?

Observed behavior and steps to reproduce

No response

Expected behavior

Compass to assume the image I assigned for it.

Notes / preliminary analysis

No response

Additional links and references

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions