示例#1
0
文件: index.php 项目: ECP-Black/ECP
                }
            }
            $koord = explode(',', $row['koord']);
            $api->addGeoPoint((double) $koord['0'], (double) $koord['1'], $html, isset($first) ? false : true);
            $first = false;
        } else {
            $koord = explode(',', $row['koord']);
            $api->addGeoPoint((double) $koord['0'], (double) $koord['1'], '<img src="images/flaggen/' . $row['country'] . '.gif" /> <strong><a href="?section=user&id=' . $row['ID'] . '" target="_blank">' . $row['username'] . '</a></strong><br />' . $row['wohnort'] . '<br /><img src="' . ($row['user_pic'] != '' ? 'images/user/' . $row['ID'] . '_' . $row['user_pic'] : 'templates/' . DESIGN . '/images/nopic.png') . '" alt="" title="' . strsave($row['username']) . '" style="max-width: 150px" />', isset($first) ? false : true);
            if ($row['user_pic'] != '') {
                $bilder[] = 'images/user/' . $row['ID'] . '_' . $row['user_pic'];
            }
            $first = false;
        }
    }
    ob_start();
    echo $api->getHeadCode() . '<script type="text/javascript">		
			window.addEvents({
				"domready" : function() { 
					var info = new Element(\'div\', {
					    \'id\': \'map_info\',
					    \'html\': \'<div class="tip-top"><div class="tip"><div id="map_tip" class="tip-text"></div></div><div class="tip-bottom"></div></div>\',
					    \'styles\': {
					        \'display\': \'none\',
					        \'position\': \'absolute\',
					        \'z-index\': 9,
					        \'top:\': \'0px\',
					        \'left:\': \'0px\'
					    }
					});	
					info.inject(document.body, \'top\');
					$("map").addEvent("mousemove", function(e) {
示例#2
0
// setup the visual design of the control
$api->setWidth(800);
$api->setHeight(600);
$api->setZoomFactor(5);
$api->addControl(GSmallMapControl);
// add a point.
$api->addGeoPoint(50, 10, "Somewhere in Germany", false);
// center to a point
$api->setCenter(51, 11);
// set to hybrid mode
$api->setMapType(VTHybrid);
?>
<head>

<?php 
echo $api->getHeadCode();
?>

</head>

<body onLoad="<?php 
echo $api->getOnLoadCode();
?>
">

<h1> Adding Geopoints to the map and view map in hybrid mode</h1>

<?php 
echo $api->getBodyCode();
?>