Commit f7f73c853ece60629d83519f6f2d273e6021c9cc
1 parent
dc2827bb
plugin update
Showing
2 changed files
with
7 additions
and
4 deletions
datalets/base-datalet/base-datalet.html
datalets/leafletjs-datalet/leafletjs-datalet.html
... | ... | @@ -105,10 +105,13 @@ Example: |
105 | 105 | var popupText = ""; |
106 | 106 | for(var j=2; j<t.data.length; j++) |
107 | 107 | { |
108 | - if(t.data[j].data[i].toString().match(new RegExp("^(http[s]?:\\/\\/(www\\.)?|ftp:\\/\\/(www\\.)?|www\\.){1}([0-9A-Za-z-\\.@:%_\+~#=]+)+((\\.[a-zA-Z]{2,3})+)(/(.)*)?(\\?(.)*)?"))) | |
108 | + if(typeof t.data[j] != 'undefined' && typeof t.data[j].data[i] != 'undefined') | |
109 | + { | |
110 | + if (t.data[j].data[i].toString().match(new RegExp("^(http[s]?:\\/\\/(www\\.)?|ftp:\\/\\/(www\\.)?|www\\.){1}([0-9A-Za-z-\\.@:%_\+~#=]+)+((\\.[a-zA-Z]{2,3})+)(/(.)*)?(\\?(.)*)?"))) | |
109 | 111 | popupText += '<image height="100" width="100" src="' + t.data[j].data[i] + '" /><br/>'; |
110 | - else | |
111 | - popupText += '<span>' + t.data[j].data[i] + '</span><br/>' | |
112 | + else | |
113 | + popupText += '<span>' + t.data[j].name + ' : ' + t.data[j].data[i] + '</span><br/>' | |
114 | + } | |
112 | 115 | } |
113 | 116 | |
114 | 117 | var popup = L.popup().setContent(popupText); | ... | ... |