grafana / worldmap-panel

Worldmap panel plugin for Grafana 3.0 that can be overlaid with circles for data points.
MIT License
305 stars 201 forks source link

Frozen map with errors #326

Open gsaiz opened 2 years ago

gsaiz commented 2 years ago

Hi,

I am trying to set up a map with a database as a datasource, selecting the "Format As" Table option..

Here is the SQL that I have used:

SELECT
  dbo.Site.Name as name,
  dbo.Site.Coordinates,
  SUBSTRING(dbo.Site.Coordinates, 1, CHARINDEX(',', dbo.Site.Coordinates) -1 ) as latitude,
  SUBSTRING(dbo.Site.Coordinates, CHARINDEX(' ', dbo.Site.Coordinates) + 1, LEN(dbo.Site.Coordinates)) as longitude,
  1 as metric
FROM
  dbo.Site

I am running into the following exceptions:

Uncaught TypeError: t is null
    project leaflet.js:1661
    latLngToPoint leaflet.js:1500
    project leaflet.js:3903
    latLngToLayerPoint leaflet.js:3925
    _project leaflet.js:7832
    _reset leaflet.js:7761
    onAdd leaflet.js:7710
    _layerAdd leaflet.js:6486
    whenReady leaflet.js:4369
    addLayer leaflet.js:6548
    eachLayer leaflet.js:6776
leaflet.js:1661
    project leaflet.js:1661
    latLngToPoint leaflet.js:1500
    project leaflet.js:3903
    latLngToLayerPoint leaflet.js:3925
    _project leaflet.js:7832
    _reset leaflet.js:7761
    onAdd leaflet.js:7710
    _layerAdd leaflet.js:6486
    whenReady leaflet.js:4369
    addLayer leaflet.js:6548
    eachLayer leaflet.js:6776
    onAdd leaflet.js:6760
    _layerAdd leaflet.js:6486
    whenReady leaflet.js:4369
    addLayer leaflet.js:6548
    addTo leaflet.js:6431
    addCircles worldmap.ts:249
    createCircles worldmap.ts:140
    drawCircles worldmap.ts:125
    r worldmap_ctrl.ts:306
    r helpers.js:72
    (Async: setTimeout handler)
    _wrapTimeFunction trycatch.js:86
    r worldmap_ctrl.ts:319
    link worldmap_ctrl.ts:347
    wrapper app.665aaa0ff07fb09970a1.js:5598
    emit index.js:202
    emit app.665aaa0ff07fb09970a1.js:5598
    render app.665aaa0ff07fb09970a1.js:993
    onDataReceived worldmap_ctrl.ts:216
    <anonymous> self-hosted:1175
    wrapper app.665aaa0ff07fb09970a1.js:5598
    emit index.js:181
    emit app.665aaa0ff07fb09970a1.js:5598
    handleQueryResult app.665aaa0ff07fb09970a1.js:3099
    next app.665aaa0ff07fb09970a1.js:3099
    RxJS 19
    next app.665aaa0ff07fb09970a1.js:3099
    RxJS 74

And then:

Uncaught TypeError: Z(...) is undefined
    distanceTo leaflet.js:864
    _containsPoint leaflet.js:7860
    _handleMouseHover leaflet.js:12223
    _onMouseMove leaflet.js:12204
    r leaflet.js:105
    s leaflet.js:2282
    r helpers.js:72
    _wrapEventTarget trycatch.js:137
    h instrument.js:365
    Xt leaflet.js:2317
    Gt leaflet.js:2237
    _initContainer leaflet.js:11906
    onAdd leaflet.js:11760
    onAdd leaflet.js:11895
    _layerAdd leaflet.js:6486
    whenReady leaflet.js:4369
    addLayer leaflet.js:6548
    getRenderer leaflet.js:12681
    beforeAdd leaflet.js:7705
    addLayer leaflet.js:6548
    eachLayer leaflet.js:6776
    onAdd leaflet.js:6760
    _layerAdd leaflet.js:6486
    whenReady leaflet.js:4369
    addLayer leaflet.js:6548
    addTo leaflet.js:6431
    addCircles worldmap.ts:249
    createCircles worldmap.ts:140
    drawCircles worldmap.ts:125
    r worldmap_ctrl.ts:306
    r helpers.js:72
    setTimeout handler*3CEA/Q</e.prototype._wrapTimeFunction/< trycatch.js:86
    r worldmap_ctrl.ts:319
    link worldmap_ctrl.ts:347
    wrapper EventBus.ts:69
    emit index.js:202
    emit EventBus.ts:60
    render panel_ctrl.ts:111
    onDataReceived worldmap_ctrl.ts:216
    wrapper EventBus.ts:69
    emit index.js:181
    emit EventBus.ts:60
    handleQueryResult metrics_panel_ctrl.ts:234
    next metrics_panel_ctrl.ts:167
    RxJS 16
leaflet.js:864

This leads to the panel being completely frozen.

I am running Grafana 8.0.6 and wordmap-panel v.0.3.3 (latest as of today from Grafana.com marketplace).

Any suggestions on how to fix this?

I attach a .gif of the behaviour:

ezgif com-gif-maker(1)