init(); // Default of 5 $clustersize = 5; if (!empty($_REQUEST['clustersize'])) { if ($_REQUEST['clustersize'] == '3') $clustersize = 3; else if ($_REQUEST['clustersize'] == '1') $clustersize = 1; } // Start of internal configuration variables // // The Cloudy theme resizes itself to max screen width, sometimes making // tables hard to construct for browser windows smaller that the screen // width. Setting $cloudy_locked = 1/0 will/won't force a the map to use // the width chosen in the GoogleMap configuration. All other themes // float the width of the map to fill the browser width nicely. $cloudy_locked = 1; // Limit this to match available number of icons. // 8 generations equals 255 individuals $MAX_PEDIGREE_GENERATIONS = min($MAX_PEDIGREE_GENERATIONS, 8); // End of internal configuration variables global $theme_name, $TEXT_DIRECTION; // -- print html header information print_header($controller->getPageTitle()); if (!$GOOGLEMAP_ENABLED) { echo "\n"; echo "\n"; if (WT_USER_IS_ADMIN) { echo "\n"; } echo "
", i18n::translate('GoogleMap module disabled'), "
\n"; echo "", i18n::translate('Manage GoogleMap configuration'), ""; echo "

"; print_footer(); return; } ?>
'; echo "

" . i18n::translate('Pedigree Map') . " " . i18n::translate('for') . " "; echo PrintReady($controller->getPersonName())."

"; // -- print the form to change the number of displayed generations if (!$controller->isPrintPreview()) { ?>
 
"; ?> "; ?>
treesize); $i++) { // -- check to see if we have moved to the next generation if ($i+1 >= pow(2, $curgen)) {$curgen++;} $person = Person::getInstance($controller->treeid[$i]); if (!empty($person)) { $pid = $controller->treeid[$i]; $name = $person->getFullName(); if ($name == i18n::translate('Private')) $priv++; $place = $person->getBirthPlace(); if (empty($place)) { $latlongval[$i] = NULL; } else { $latlongval[$i] = get_lati_long_placelocation($person->getBirthPlace()); if ($latlongval[$i] != NULL && $latlongval[$i]["lati"]=='0' && $latlongval[$i]["long"]=='0') { $latlongval[$i] = NULL; } } if ($latlongval[$i] != NULL) { $lat[$i] = str_replace(array('N', 'S', ','), array('', '-', '.'), $latlongval[$i]["lati"]); $lon[$i] = str_replace(array('E', 'W', ','), array('', '-', '.'), $latlongval[$i]["long"]); if (($lat[$i] != NULL) && ($lon[$i] != NULL)) { $count++; } else { // The place is in the table but has empty values if (!empty($name)) { if (!empty($missing)) $missing .= ",\n "; $addlist = "". $name . ""; $missing .= $addlist; $miscount++; } } } else { // There was no place, or not listed in the map table if (!empty($name)) { if (!empty($missing)) $missing .= ",\n "; $addlist = "". $name . ""; $missing .= $addlist; $miscount++; } } } } // // echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\"\"\n"; echo "
\n"; if (WT_USER_IS_ADMIN) { echo ""; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "", i18n::translate('Manage GoogleMap configuration'), ""; echo "\n"; echo "", i18n::translate('Edit geographic place locations'), ""; echo "\n"; echo "", i18n::translate('Place Check'), ""; echo "
\n"; } echo "
 \n"; echo "
\n"; // display info under map echo "
"; echo ""; echo " "; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
"; // print summary statistics if (isset($curgen)){ $total=pow(2,$curgen)-1; $miss=$total-$count-$priv; echo i18n::plural( '%1$d individual displayed, out of the normal total of %2$d, from %3$d generations.', '%1$d individuals displayed, out of the normal total of %2$d, from %3$d generations.', $count, $count, $total, $curgen ), '
'; echo "
\n"; if ($priv) { echo i18n::plural('%s individual is private.', '%s individuals are private.', $priv, $priv), '
'; } if ($count+$priv != $total) { if ($miscount == 1) { echo "".$miscount." "; echo " ".i18n::translate('individual is missing birth place map coordinates:')."
\n"; } else if ($miscount > 1 && $miscount < 5) { echo "".$miscount." "; echo " ".i18n::translate('individuals are missing birth place map coordinates:')."
\n"; } else if ($miscount > 21 && substr($miscount, -1, 1) > 1 && substr($miscount, -1, 1) < 5 && substr($miscount, -2, 1) != 1) { echo "".$miscount." "; echo " ".i18n::translate('individuals are missing birth place map coordinates:')."
\n"; } else if ($miscount == 0) { echo " ".i18n::translate('No ancestors in the database.')."
\n"; } else { echo "".$miscount." "; echo " ".i18n::translate('individuals are missing birth place map coordinates:')."
\n"; } echo $missing . "
\n"; } } echo "
\n"; echo ""; ?> isPrintPreview()) { echo "


\n"; } print_footer(); ?>