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] Input data given to 'xxx' is not a valid GeoJSON object #2381

Open
elvince opened this issue Apr 26, 2024 · 0 comments
Open

[Bug] Input data given to 'xxx' is not a valid GeoJSON object #2381

elvince opened this issue Apr 26, 2024 · 0 comments
Labels

Comments

@elvince
Copy link

elvince commented Apr 26, 2024

Description

hi,

With my source setup like:
<Source id="missions" type="geojson" data={routes} lineMetrics={true}>

with routes be set as undefined, I have this warning:
Input data given to 'missions' is not a valid GeoJSON object

Expected Behavior

no warning as data can be undefined as per typsecript definition

Steps to Reproduce

create a map component with souce like
<Source id="missions" type="geojson" data={routes} lineMetrics={true}>
with routes as

  const [routes, setRoutes] = useState<
    turf.FeatureCollection<turf.LineString, {test:string}> | undefined
  >(undefined);

Environment

  • Framework version: 7.1.7
  • Map library: 3.3.0

Logs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant