<!DOCTYPE html>
<html>
<head>
<title>HTML</title>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
<script type='text/javascript' src='http://www.bing.com/api/maps/mapcontrol?callback=getMap' async defer></script>
<script src='sample.js'></script>
</head>
<body onload="sample()">
<div id='memo'></div>
</body>
</html>
function sample() {
var map = new Microsoft.Maps.Map(document.getElementById('memo'), {
credentials: 'WOsrHWjBlYiAuwBoFtBU~jDjkd9pyBegKchaBXTVfUA~Ahk8U_EIJ_DWI1rVQbQKJF-628dFKe3KHOg9zOM_SRwv20xjvIPolUXQmMaavuFF',
center: new Microsoft.Maps.Location(35, 139),
zoom: 9
});
var x1 = new Microsoft.Maps.Location(35.1, 139.1);
var x2 = new Microsoft.Maps.Location(35.2, 139.2);
var x5 = new Microsoft.Maps.Location(35.3, 139.3);
var pp = new Microsoft.Maps.EntityCollection();
pp.push(new Microsoft.Maps.Pushpin(x1, { text: 'A' }));
pp.push(new Microsoft.Maps.Pushpin(x2, { text: 'B' }));
pp.push(new Microsoft.Maps.Pushpin(x5, { text: 'C' }));
map.entities.push(pp);
}
最終更新:2016年04月15日 12:12