通过a标签调用地图导航

image.png

image.png

image.png

image.png
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>高德导航</title>
        <meta name="viewport"
              content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <script type="text/javascript" src="../../jQuery/jquery-1.9.1.min.js"></script>
    </head>
    <style>
        html,body{
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
        }
        
        .list{
            width: 100%;
            height: auto;
            padding: 0 10px;
            box-sizing: border-box;
        }
        .li{
            display: block;
            width: 100%;
            height: 40px;
            line-height: 40px;
            font-size: 18px;
            border: 1px solid #999;
            background: #fff;
            color: #666;
            margin-top: 10px;
            padding: 0 10px;
            box-sizing: border-box;
        }
        .iframe-map{
            width: 100%;
            height: 100%;
            position: fixed;
            left: 0;
            top: 0;
            z-index: 100;
            display: none;
        }
        .iframe-map-active{
            display: block;
        }
        .iframe-map-end{
            position: absolute;
            left: 0;
            bottom: -100%;
            width: 100%;
            height: auto;
            padding: 0 10px;
            box-sizing: border-box;
            transition: bottom 2s;
        }
        .iframe-map-end a{
            display: block;
            width: 100%;
            height: 40px;
            line-height: 40px;
            font-size: 18px;
            border: 1px solid #999;
            background: #fff;
            color: #666;
            margin-bottom: 10px;
            padding: 0 10px;
            box-sizing: border-box;
            text-decoration: none;
            text-align: center;
        }
        .iframe-map-active .iframe-map-end{
            bottom: 0;
        }
    </style>
    <body>
        <div class="list">
            <div class="li">融科金色时代</div>
        </div>
        
        <div class="iframe-map">
            <div class="iframe-map-end">
                <a href="https://m.amap.com/navi/?dest=106.54,29.4348&destName=终点地址名称或者终点地址详细名称&key=你申请的key值">高德地图</a>
                <a href="http://apis.map.qq.com/tools/poimarker?type=0&amp;marker=coord:29.4348,106.54&amp;name=终点地址名称&amp;addr=终点地址详细名称&amp;key=你申请的key值&amp;referer=myapp">腾讯地图</a>
            </div>
        </div>
        <script type="text/javascript">
            $(".li").on('click',function(){
                $(".iframe-map").addClass("iframe-map-active")
            })
        </script>
    </body>
    
</html>
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容