From 1676e292c61264890700cccef43a9be049d62c26 Mon Sep 17 00:00:00 2001 From: andrpet Date: Thu, 7 Jul 2016 17:31:13 +0200 Subject: [PATCH] plugin update --- datalets/leafletjs-geojson-datalet/leafletjs-geojson-datalet.html | 5 +++++ 1 file changed, 5 insertions(+), 0 deletions(-) diff --git a/datalets/leafletjs-geojson-datalet/leafletjs-geojson-datalet.html b/datalets/leafletjs-geojson-datalet/leafletjs-geojson-datalet.html index ecb2d0c..a3f5559 100755 --- a/datalets/leafletjs-geojson-datalet/leafletjs-geojson-datalet.html +++ b/datalets/leafletjs-geojson-datalet/leafletjs-geojson-datalet.html @@ -93,6 +93,11 @@ Example: for (var i = 0; i < t.data[0].data.length; i++) { + try{ + if(typeof t.data[0].data[i] != 'object') + t.data[0].data[i] = JSON.parse(t.data[0].data[i]); + }catch(e){} + var geoJsonLayer = L.geoJson(t.data[0].data[i]).addTo(t._component.map); if(t.data.length > 1) -- libgit2 0.21.4