[Bug]: Typescript conversions fails to compile (ShapeSource, PointAnnotation)
See original GitHub issueMapbox Implementation
Mapbox
Mapbox Version
default
Platform
iOS, Android
@rnmapbox/maps
version
#main
Standalone component to reproduce
import React from 'react';
import {
MapView,
ShapeSource,
LineLayer,
Camera,
PointAnnotation,
ShapeSource
} 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="idStreetLayer" shape={aLine}>
<LineLayer id="idStreetLayer" />
</ShapeSource>
</MapView>
);
}
}
Observed behavior and steps to reproduce
It doesn’t compile because the files aren’t Typescript.
Expected behavior
It compiles
Notes / preliminary analysis
Provided Typescript files are not compiling
Additional links and references
None
Issue Analytics
- State:
- Created a year ago
- Comments:19 (5 by maintainers)
Top Results From Across the Web
rnmapbox/Lobby - Gitter
Hi @mfazekas ShapeSource onPress is working fine but i'm not able to drag complete ShapeSource on maop just like we do in Point...
Read more >rnmapbox/maps: A Mapbox react native module for ... - GitHub
A community-supported, open-source React Native library for building maps with the Mapbox Maps SDK for iOS and Mapbox Maps SDK for Android ...
Read more >Error: TSError: Unable to compile TypeScript - Stack Overflow
I had met same issue. First I remove ts-node and typescript from package.json . then, npm install ts-node --save-dev npm install typescript ......
Read more >Source - GitHub
`MapboxGL.setAccessToken` now requires `MapboxGL.setWellKnownTileServer` on maplibre. #### Changes: - Convert Camera component to TypeScript and update ...
Read more >A Mapbox GL React Native Module for Creating Custom Maps
This repository will only accept PRs containing bug fixes. ... with source map support that lets you use Jest to test projects written...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@BubbleTrouble14 @mfazekas @mvniekerk
Updated to latest (4.8.4), same problem.
Removing type annotations from PointAnnotation and ShapeSource like this fixed it for me:
to
My app now runs.
This is obviously a temporary fix though, would like to figure out what’s wrong. I’m on a slightly old RN version:
0.68.2
@KiwiKilian I’m not who you referenced, but here is a log after updating from v8 to v10 of my app: