Commit 1676e292c61264890700cccef43a9be049d62c26
1 parent
ff028a33
plugin update
Showing
1 changed file
with
5 additions
and
0 deletions
datalets/leafletjs-geojson-datalet/leafletjs-geojson-datalet.html
... | ... | @@ -93,6 +93,11 @@ Example: |
93 | 93 | |
94 | 94 | for (var i = 0; i < t.data[0].data.length; i++) |
95 | 95 | { |
96 | + try{ | |
97 | + if(typeof t.data[0].data[i] != 'object') | |
98 | + t.data[0].data[i] = JSON.parse(t.data[0].data[i]); | |
99 | + }catch(e){} | |
100 | + | |
96 | 101 | var geoJsonLayer = L.geoJson(t.data[0].data[i]).addTo(t._component.map); |
97 | 102 | |
98 | 103 | if(t.data.length > 1) | ... | ... |