pmap_returnMapImgURL(); $scalebarURL = $pmap->pmap_returnScalebarImgURL(); $mapJS = $pmap->pmap_returnMapJSParams(); $refBoxStr = $pmap->pmap_returnRefBoxStr(); $mapwidth = $pmap->pmap_returnMapW(); $mapheight = $pmap->pmap_returnMapH(); $geo_scale = $pmap->pmap_returnGeoScale(); // Check if layers in TOC should be refreshed if ($scaleLayers) { foreach ($grouplist as $grp) { $layerList = $grp->getLayers(); foreach ($layerList as $glayer) { $layName = $glayer->getLayerName(); $qLayer = $map->getLayerByName($layName); if (checkScale($map, $qLayer, $geo_scale)) { $visGroupsAfter[] = $layName; } if (checkScale($map, $qLayer, $old_geo_scale)) { $visGroupsBefore[] = $layName; } } } if ($visGroupsAfter == $visGroupsBefore) { $refreshToc = 0; } else { $refreshToc = 1; } if (isset($_SESSION['zoom_extparams'])) { unset($_SESSION['zoom_extparams']); //error_log("pippo"); $refreshToc = 1; } } else { $refreshToc = 0; } // JS objects from map creation $strJS .= "mapW:'" . $mapJS['mapW'] . "', "; $strJS .= "mapH:'" . $mapJS['mapH'] . "', "; $strJS .= "refW:'" . $mapJS['refW'] . "', "; $strJS .= "refH:'" . $mapJS['refH'] . "', "; $strJS .= "minx_geo:'" . $mapJS['minx_geo'] . "', "; $strJS .= "maxy_geo:'" . $mapJS['maxy_geo'] . "', "; $strJS .= "xdelta_geo:'" . $mapJS['xdelta_geo'] . "', "; $strJS .= "ydelta_geo:'" . $mapJS['ydelta_geo'] . "' "; // Serialize url_points if (is_array($url_points)) { foreach ($url_points as $up) { $urlPntStr .= $up[0] . "@@" . $up[1] . "@@" . urlencode($up[2]) . '@@@'; } $urlPntStr = addslashes(substr($urlPntStr, 0, -3)); //error_log($urlPntStr); } // return JS object literals "{}" for XMLHTTP request echo "{method:'updateMap', sessionerror:'false', mapURL:'$mapURL', scalebarURL:'$scalebarURL', geo_scale:'$geo_scale', refBoxStr:'$refBoxStr', tocStyle:'$tocStyle', refreshToc:'$refreshToc', urlPntStr:'$urlPntStr', $strJS}"; } ?>