xue.gif
    需求

    1. 1、激活地图的点击事件
    2. 2、给地图添加点
    1. <body>
    2. <button onclick="active()">激活地图事件</button>
    3. <button onclick="remove()">移除地图事件</button>
    4. <div id="map_container">
    5. </div>
    6. <script>
    7. var map = new ol.Map({
    8. target:"map_container",
    9. layers:[gaode],
    10. view:new ol.View({
    11. projection:'EPSG:4326',
    12. center:[114.30,30.50],
    13. zoom:4
    14. })
    15. })
    16. </script>
    17. </body>