# $radius = $entry['percentage']/100 * 50000; #} // 100km x 100km = 10000 $ratio = $entry['land_count'] / 10000; //100% = 50k $radius = $entry['percentage'] / 100 * $ratio * 50000; #print "<h3>{$entry['hunk_square']}</h3>"; #print "'land_count'= {$entry['land_count']}<BR>"; #print "'percentage'= {$entry['percentage']}<BR>"; #print "ratio=$ratio<BR>"; #print "radius=$radius<BR>"; $x = $entry['avgx']; $y = $entry['avgy']; list($wgs84_lat, $wgs84_long) = $conv->internal_to_wgs84($x, $y, $ri); $point = new kmlPoint($wgs84_lat, $wgs84_long); $placemark = new kmlPlacemark_Circle($entry['hunk_square'], $entry['hunk_square'], $point, $radius); $placemark->setItem('description', $entry['percentage'] . '%'); $placemark->useHoverStyle('c1'); $circles->addChild($placemark); $x = intval(($entry['x'] - $origin['origin_x']) / 100) * 100 + $origin['origin_x']; $y = intval(($entry['y'] - $origin['origin_y']) / 100) * 100 + $origin['origin_y']; list($south, $west) = $conv->internal_to_wgs84($x, $y, $ri); list($north, $east) = $conv->internal_to_wgs84($x + 100, $y + 100, $ri); $Region = $placemark->addChild('Region'); $Region->setBoundary($north, $south, $east, $west); $Region->setLod(10, 600); $Region->setFadeExtent(50, 200); $networklink = new kmlNetworkLink(null, $entry['hunk_square']); $file = getKmlFilepath($kml->extension, 2, $square, $entry['hunk_square']); $UrlTag = $networklink->useUrl("http://" . $CONF['KML_HOST'] . $file); $html .= getHtmlLink($file, $entry['hunk_square'], 'in Myriad', " (" . $names[$entry['hunk_square']] . ")");
#if ($entry['land_count'] < 10) { # //100% = 1k # $radius = $entry['percentage'] * 10; #} else { # //100% = 10k # $radius = $entry['percentage'] * 100; #} // 20km x 20km = 400 $ratio = $entry['land_count'] / 400; //100% = 10k $radius = $entry['percentage'] / 100 * $ratio * 10000; $x = $entry['avgx']; $y = $entry['avgy']; list($wgs84_lat, $wgs84_long) = $conv->internal_to_wgs84($x, $y, $ri); $point = new kmlPoint($wgs84_lat, $wgs84_long); $placemark = new kmlPlacemark_Circle(null, $entry['hunk_square'], $point, $radius); $placemark->setItem('description', $entry['percentage'] . '%'); $placemark->useHoverStyle('c2'); $folder->addChild($placemark); $x = intval(($entry['x'] - $prefix['origin_x']) / 20) * 20 + $prefix['origin_x']; $y = intval(($entry['y'] - $prefix['origin_y']) / 20) * 20 + $prefix['origin_y']; list($south, $west) = $conv->internal_to_wgs84($x, $y, $ri); list($north, $east) = $conv->internal_to_wgs84($x + 20, $y + 20, $ri); $Region = $placemark->addChild('Region'); $Region->setBoundary($north, $south, $east, $west); $Region->setLod(100, 650); $Region->setFadeExtent(50, 150); $networklink = new kmlNetworkLink(null, $entry['hunk_square']); $file = getKmlFilepath($kml->extension, 3, $square, $entry['hunk_square']); $UrlTag = $networklink->useUrl("http://" . $CONF['KML_HOST'] . $file); $html .= getHtmlLink($file, $entry['hunk_square'], 'in tile', " (at least {$entry['images']} images)");