emilhe / dash-leaflet

MIT License
213 stars 37 forks source link

clusterToLayer causing trouble in debug mode #82

Closed ikhomyakov closed 3 years ago

ikhomyakov commented 3 years ago

(edited Apr 3, 2021)

Hi Emil,

I tried to run the "Scatter plot" example (the last example at https://dash-leaflet.herokuapp.com) but in debug mode app.run_server(debug=True) and ran into the following issue:

Invalid argument `clusterToLayer` passed into GeoJSON with ID "geojson". 
Expected `string`. Was supplied type `object`. 
Value provided: { "variable": "dlx.scatter.clusterToLayer" }
10:17:45 PM
Invalid argument `clusterToLayer` passed into GeoJSON with ID "geojson".
Expected `string`.
Was supplied type `object`.
Value provided: 
{
  "variable": "dlx.scatter.clusterToLayer"
}

Have you seen this before? We are working on a flood index insurance project in Bangladesh and trying to develop an application that displays stream gauges as points that are color-coded according to the degree of correlation between the data from the gauge and nearby flooding, as inferred from satellite images and would appreciate your help with this issue.

Best regards,

Igor

emilhe commented 3 years ago

I am not sure what is happening. But i have decided to abandon the dlx js namespace and instead provide more elaborate examples in the documentation. In this way, it will be more transparent what is going on, and easier to customize and debug (at the expense of more usercode).

kuhess commented 3 years ago

I just proposed a PR to fix this error in debug mode.