Comments (8)
Hey Sptrakesh,
It looks like the rows are wrap with a "location" which it doesn't except. Could you send the query you used, so I can see if it's a problem with the plugin or the query?
And it's currently not possible to have the map center itself based on the points, but should be easy to implement, when I have the time.
from alexandra-trackmap-panel.
Hello,
The data is coming from an Akumuli event stream that is retrieved via a custom JSON datasource, so it will be hard for you to replicate.
When I did not see the data, I inspected the map query control implementation, and it looked like you expect a structure similar to what I have above as well.
https://github.com/alexandrainst/alexandra-trackmap-panel/blob/master/src/map_ctrl.js#L88
If I am reading it right, for each row
in the rows
array, you retrieve the location
object, and within the location
object you verify the type
is geo:json
and that it has a value
property with an array of coordinates
.
If you can share what a valid response should look like (maybe expand the README), I can validate against that. I will also try changing the output in the JSON datasource to be simple latitude
longitude
to see if that works better.
from alexandra-trackmap-panel.
Did a debug build by adding some console output, and now I know why the map shows nothing. Looks like the output is invalid (no errors shown) as far as what Grafana expects. See this screen capture where you can see the query inspector shows the data, but in the map control, during iteration it just sees an array of null
values.
Any idea why Grafana hands over different results to the map control?
from alexandra-trackmap-panel.
Here is the structure that i'm getting from a CrateDB:
[{
columns: [
{ text: "location" },
{ text: "time_index" }
],
rows: [
[
"{\"type\":\"geo:json\",\"value\":{\"coordinates\":[56.18803,10.16773],\"type\":\"Point\"},\"metadata\":{\"timestamp\":{\"type\":\"DateTime\",\"value\":\"2019-12-19T06:35:59.390Z\"}}}",
"2019-12-19T06:35:59Z"
],
[
"{\"type\":\"geo:json\",\"value\":{\"coordinates\":[56.18803,10.16773],\"type\":\"Point\"},\"metadata\":{\"timestamp\":{\"type\":\"DateTime\",\"value\":\"2019-12-19T06:38:44.376Z\"}}}",
"2019-12-19T06:38:44Z"
]
],
type: "table"
}]
It doesn't have to be a json string, here is the string as a object:
{
"type": "geo:json",
"value": {
"coordinates": [56.18803, 10.16773],
"type": "Point"
},
"metadata": {
"timestamp": {
"type": "DateTime",
"value": "2019-12-19T06:35:59.390Z"
}
}
}
from alexandra-trackmap-panel.
The metadata above is not needed for the plugin, it's just part of NSGIv2 data format
from alexandra-trackmap-panel.
Thanks for the samples, that is very helpful. Still not clear how the array without a wrapper location
object works based on line 88 (on master branch) in the map control code. The bigger issue in my case seems to be a mismatch in the data I see in the query inspector vs the data that gets to the map control.
https://sptci.com/uploads/map-issue.png
from alexandra-trackmap-panel.
The location
variable, that is used in line 88, is the index in the array that was found from the columns list.
Haven't had any problems with a mismatch between the query inspector and the map controls data. This seems more like a problem with the Grafana and your data source.
The response I get in the query inspector looks a lot different compared to yours:
from alexandra-trackmap-panel.
Thanks for your help. Definitely looks like a datasource issue.
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
- Map not updating correctly when starting with null/0 (lat/lon) values in time range HOT 1
- 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.