Created
July 28, 2015 07:21
-
-
Save kikyous/3e794f1817bcdd99432f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style type="text/css"> | |
#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;} | |
</style> | |
<div id="allmap"></div> | |
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=myTuIQ3Uc0cfVMp8Mhocf5MW"></script> | |
<script type="text/javascript"> | |
var map = new BMap.Map("allmap"); | |
var point = new BMap.Point(116.404, 39.915); | |
map.centerAndZoom(point, 15); | |
var pt = new BMap.Point(116.417, 39.909); | |
var myIcon = new BMap.Icon("http://developer.baidu.com/map/jsdemo/img/fox.gif", new BMap.Size(300,157)); | |
var marker2 = new BMap.Marker(pt,{icon:myIcon}); // 创建标注 | |
map.addOverlay(marker2); // 将标注添加到地图中 | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment