Comments (1)
I had the same problem. First I tried to patch the code (from commit a7217bc):
diff --git a/src/TrackMapPanel.tsx b/src/TrackMapPanel.tsx
index 3c410d7..375a591 100644
--- a/src/TrackMapPanel.tsx
+++ b/src/TrackMapPanel.tsx
@@ -37,10 +37,9 @@ export const TrackMapPanel = ({ options, data, width, height }: PanelProps<Track
useEffect(() => {
if (mapRef.current !== null) {
- if (options.map.zoomToDataBounds) {
+ if (positions && positions.length !== undefined && options.map.zoomToDataBounds && positions.length > 1) {
const bounds = getBoundsFromPositions(positions);
mapRef.current.leafletElement.fitBounds(bounds, { animate: false });
- }
const bounds = mapRef.current.leafletElement.getBounds();
updateMap(bounds);
}
But then I realized that the auto-update would no longer work. So in fact, my fix is equivalent to disabling the Zoom map to fit data bounds
option in the plugin's settings ("zoomToDataBounds": false
in the JSON).
from alexandra-trackmap-panel.
Related Issues (20)
- Bug during plugin loading on new widget HOT 1
- Angular is deprecated - please migrate to React HOT 1
- [Plugin file not found] Missing images for markers, etc. HOT 1
- I have downloaded tarck map 2.2.1 and copied to local grafana v9.5.2 and it gives below error HOT 2
- 'lats is undefined' HOT 3
- Use map bounds in query; zoom not working correctly
- Map not showing after pressing apply HOT 3
- Plugin at risk of deprecation HOT 3
- Show possition in time from other panel? HOT 1
- Newest versions available on Grafana Cloud HOT 2
- HexbinLayer not updating to new time range
- X,Y Trackmap over a static background
- Wrong option name in panel options
- Update Track Map to latest version on Grafana Plugin repository HOT 4
- How to add routing feature?
- Feature suggestion: Live and non-live tracks
- Feature suggestion: change view via grafana template variable
- Grafana v8.3.4 plugin disabled HOT 2
- Feature: Support timesyncing with new Grafana Time series graph HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alexandra-trackmap-panel.