Last active
August 29, 2015 14:02
-
-
Save ffflabs/4b0e70699b7c7d73ecce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery('#datasets').on('click', '.toggle_visualizations', function () { | |
var thischeckbox = jQuery(this); | |
var ladata = thischeckbox.data(); | |
ladata.flag = thischeckbox.is(':checked'); | |
DataSet.saveSetting({ | |
visible: ladata.flag | |
}); | |
instaGIS.trackEvent('updateVisibility', ladata, true); | |
}); | |
instaGIS.updateVisibility = function (ladata) { | |
var id_dataset = ladata.id_dataset; | |
var category = ladata.category; | |
globalmap[category] = globalmap[category] || {}; | |
var DataSet = globalmap[category][id_dataset]; | |
DataSet.setOptions({ | |
visible: ladata.flag | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment