Skip to content

[Bug]: CompassImage not working #4170

@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

import React from 'react';
import {
  MapView,
  Camera,
  Images,
} 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>
    );
  }
}

Observed behavior and steps to reproduce

Compass did not render correctly

Expected behavior

Compass to assume the image I assigned for it.

Notes / preliminary analysis

I have no error nor warning on this. I have read some issues that mention something like this but only found #2402

It is from 2022, any update on this matter?

Additional links and references

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🪲Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions