一般的なマーカーを表示する
マーカー内部にシンプルなコンテンツを表示するサンプル。
サンプルコード
このデモのソースコード
(function($){
window.addEvent("domready", function(){
var map = new google.maps.Map($('gmap'), {
zoom: 15,
center: new google.maps.LatLng(35.6666870, 139.731859),
mapTypeId: google.maps.MapTypeId.ROADMAP
});
var marker = new MMap.Marker.HTML({
map: map,
className: 'marker markerDefault',
title: 'Marker who contains simple contents',
content: 'HTML contents can be inserted.
'
+ 'It is usual to put sentences and photographs of several lines.',
position: new google.maps.LatLng(35.6666870, 139.731859),
visible: true
});
});
}(document.id));
HTML
マーカーの文書構造
<div class="ovarlayView marker markerDefault"> <div class="inner"> <div class="hd"> <p class="title">Marker who contains simple contents</p> </div> <div class="bd"> <div class="content">HTML contents can be inserted. <br /> It is usual to put sentences and photographs of several lines.</div> </div> <div class="ft"></div> </div> </div>