Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Property lineMetrics expected to be a number or nil but was: 1 #3780

Open
FinnLawrence opened this issue Feb 17, 2025 · 0 comments
Open
Labels
bug 🪲 Something isn't working

Comments

@FinnLawrence
Copy link

FinnLawrence commented Feb 17, 2025

Mapbox Implementation

Mapbox

Mapbox Version

10.19.3, also tested with 11.8.0

React Native Version

0.76.7

Platform

iOS

@rnmapbox/maps version

10.1.33

Standalone component to reproduce

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}}>
        <Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
        <ShapeSource id="box" shape={aLine} lineMetrics={true}>
          <LineLayer id="box" />
        </ShapeSource>
      </MapView>
    );
  }
}

Observed behavior and steps to reproduce

When setting the lineMetrics property on a shape source, getting (NOBRIDGE) ERROR Mapbox [error] Property lineMetrics expected to be a number or nil but was: 1 in the terminal.

This occurs for the following that I tried:

  • lineMetrics={true}
  • lineMetrics="true"
  • lineMetrics={1}
  • lineMetrics

Expected behavior

Expect that lineMetrics works as documented.

Notes / preliminary analysis

No response

Additional links and references

No response

@FinnLawrence FinnLawrence added the bug 🪲 Something isn't working label Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant