百度地图显示多个标注点

分类:软件工具     发布:2015-08-15     来源:root     浏览:6116 次

将以下代码单独保存为html文件,打开即可预览效果

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>百度地图API显示多个标注点带提示的代码</title>
    <!--css-->
    <style type="text/css">
        body { margin: 0; font-family: "Helvetica,Arial,FreeSans"; color: #000000; font-size: 12px; }
        .demo_main { padding: 20px; padding-top: 10px; }
        .demo_title { padding: 10px; margin-bottom: 10px; background-color: #D3D8E0; border: solid 1px gray; }
        .demo_content { padding: 10px; margin-bottom: 10px; border: solid 1px gray; }
        fieldset { border: 1px solid gray; }
    </style>
    <!--javascript-->
    <script src="http://www.w3school.com.cn/jquery/jquery.js" type="text/javascript"></script>
</head>
<body>
    <div class="demo_main">
        <fieldset class="demo_title">
            百度地图API显示多个标注点带提示的代码
        </fieldset>
        <fieldset class="demo_content">
            <div style="min-height: 300px; width: 100%;" id="map">
            </div>
            <script type="text/javascript">
                var markerArr = [
                    { title: "名称:广州火车站", point: "113.264531,23.157003", address: "广东省广州市广州火车站", tel: "12306" },
                    { title: "名称:广州塔(赤岗塔)", point: "113.330934,23.113401", address: "广东省广州市广州塔(赤岗塔) ", tel: "18500000000" },
                    { title: "名称:广州动物园", point: "113.312213,23.147267", address: "广东省广州市广州动物园", tel: "18500000

如果觉得文章对您有帮助,您可以对我进行打赏 ¥1.48 元(金额随机^_^,每次刷新金额不同)。

请使用支付宝扫码支付

留言评论

*称  呼:
*联系方式: 方便与您取得联系,推荐使用邮箱。
*内  容:

已有评论

暂无数据

上一篇:C# 二维码生成工具

下一篇:无法删除登录名 '***',因为该用户当前正处于登录状态。 (Microsoft SQL Server,错误: 15434)