Strict Standards: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in /www/wwwroot/daxuecn/www/map.php on line 3
function showAddress() {
var address="通学学院"; //获取字段的值
map = new GMap2(document.getElementById("mymap"));
geocoder = new GClientGeocoder();
if (geocoder) {
geocoder.getLatLng(
address,
function(point) {
map.setCenter(point, 13); //缩放的级别,数字越大精度越高,最高不超过22,建议设置13到15
var marker = new GMarker(point);
map.addOverlay(marker); //显示地图标记
marker.openInfoWindowHtml(address);
map.addControl(new GSmallMapControl());//显示地图缩放控制条,此处为小控制条.
map.enableDoubleClickZoom(); //支持双击缩放
}
);
}
}
window.onload=showAddress;