Created
February 24, 2016 12:34
-
-
Save masaponto/c75c76a75c937e2eb6a4 to your computer and use it in GitHub Desktop.
This file contains 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
<!-- reference http://www.hanemaru.com/itemcolumn/11yolp003.html --> | |
<!DOCTYPE html> | |
<html> | |
<body> | |
<div id="map" style="width:400px; height:300px"></div> | |
<script type="text/javascript" charset="utf-8" src="http://code.jquery.com/jquery-latest.js"></script> | |
<script type="text/javascript" charset="utf-8" src="http://js.api.olp.yahooapis.jp/OpenLocalPlatform/V1/jsapi?appid=[your-id-goes-here]"></script> | |
<script type="text/javascript"> | |
window.onload = function(){ | |
var ymap = new Y.Map("map"); | |
ymap.drawMap(new Y.LatLng(35.66572, 139.73100), 17, Y.LayerSetId.NORMAL); | |
/* ymap.addControl(new Y.LayerSetControl()); | |
ymap.addControl(new Y.ScaleControl()); | |
ymap.addControl(new Y.SliderZoomControlHorizontal()); */ | |
var icon = new Y.Icon('http://i.yimg.jp/images/map/yy/images/icon/yy_aicon_06_32pix.gif'); | |
var marker = new Y.Marker(new Y.LatLng(35.66572, 139.73100), {title: "東京ミッドタウンっぽい", icon: icon}); | |
marker.bindInfoWindow('<img src="http://www.hanemaru.com/img/profileimg.jpg"><br>hogehoge'); | |
ymap.addFeature(marker); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment