我想使用Wikimapia API。
我想在Maps API中使用此信息绘制多边形。
答案 0 :(得分:1)
示例:
<script type="text/javascript" >
var apikey = "YOUR API KEY";
var request = "http://api.wikimapia.org/?function=box&bbox=99.555,1.2,104.353,6.751&category=88&count=2&format=jsonp&jsoncallback=readwikimapia&key="+apikey;
// Callback defined in the URL.
// This function is run by the code from WikiMapia
function readwikimapia(data){
document.write(data.folder[0].polygon[0].x);
}
// Create a script object to load the jsonp script
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = request;
document.body.appendChild(script);
</script>