Created
September 17, 2013 08:40
-
-
Save xiaok/6591696 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
//引入sdk | |
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.5&ak=92629415fca97664eb35673e5399d64a"></script> | |
<script type="text/javascript" src="http://developer.baidu.com/map/jsdemo/demo/convertor.js"></script> | |
//api取出的lon和lat | |
var lon = something... | |
var lat = something... | |
var toPoint = new BMap.Point(lon,lat); | |
BMap.Convertor.translate(toPoint,2,function(baiduToPoint){ | |
//dest即为转换后的集合 | |
var dest = baiduToPoint.lat+','+baiduToPoint.lng; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment