Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<!-- 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
You can’t perform that action at this time.