We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
mapbox-gl-js version:3.4.0
vue2 environment uses mapbox version 3.4.0 When vector graphics are used, markers can be displayed normally, but lines cannot be displayed
handleRenderPath() { if (this.map.getLayer('trajectory-line')) { this.map.removeLayer('trajectory-line'); } if (this.map.getSource('trajectory')) { this.map.removeSource('trajectory'); } // 重新添加源和图层 this.map.addSource('trajectory', { type: 'geojson', data: { type: 'FeatureCollection', geometry: { type: 'LineString', coordinates: this.pathCoordinates } } }); this.map.addLayer({ id: 'trajectory-line', type: 'line', source: 'trajectory', layout: { 'line-join': 'round', 'line-cap': 'round' }, paint: { 'line-color': '#888', // Customize color 'line-width': 20, // Customize line width 'line-opacity': 1 // Customize opacity } }); },
https://docs.mapbox.com/mapbox-gl-js/example/zoomto-linestring/
The text was updated successfully, but these errors were encountered:
No branches or pull requests
mapbox-gl-js version:3.4.0
Question
vue2 environment uses mapbox version 3.4.0 When vector graphics are used, markers can be displayed normally, but lines cannot be displayed
Links to related documentation
https://docs.mapbox.com/mapbox-gl-js/example/zoomto-linestring/
The text was updated successfully, but these errors were encountered: