<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false&hl=ja"></script>
<script type="text/javascript">
function initialize() {
var initPos = new google.maps.LatLng(36.3219088, 139.0032936);
var myOptions = {
noClear : true,
center : initPos,
zoom : 12,
mapTypeId : google.maps.MapTypeId.ROADMAP
};
var map_canvas = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
var kmlUrl = "http://<ホスト名>/hoge.kml"; //KMLファイルの読み込み
var kmlLayer = new google.maps.KmlLayer(kmlUrl, {preserveViewport:true});
kmlLayer.setMap(map_canvas);
}
</script>
</head>
<body onload="initialize()">
<div id="map_canvas" style="width:100%; height:100%"></div>
</body>
</html>
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme