|
@@ -38,8 +38,26 @@ $(document).ready(function () {
|
|
map.on('zoomend', function () {
|
|
map.on('zoomend', function () {
|
|
setDataValue();
|
|
setDataValue();
|
|
});
|
|
});
|
|
|
|
+
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+// Espera que el tab mostrado tenga la clase CSS 'active' y hace un refresh del mapa
|
|
|
|
+// debido a que al estar oculto en un tab no se muestra con el tamaño correcto
|
|
|
|
+var tab_id;
|
|
|
|
+$('.nav-tabs a').on('click', function() {
|
|
|
|
+ tab_id = $(this).attr('href');
|
|
|
|
+ checkForChanges();
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+function checkForChanges()
|
|
|
|
+{
|
|
|
|
+ if ($(tab_id).hasClass('active')) {
|
|
|
|
+ map._onResize();
|
|
|
|
+ } else {
|
|
|
|
+ setTimeout(checkForChanges, 500);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
function getDataCoords()
|
|
function getDataCoords()
|
|
{
|
|
{
|
|
var jsonParseData = {};
|
|
var jsonParseData = {};
|