
var CShopMaker = Class.create();
CShopMaker.prototype = {

objMap:Object,
objMarker:Object,
objPoint:Object,
objIcon:Object,
objClick:Object,
numNo:Number,
numId:Number,
numLat:Number,
numLon:Number,
numZip:String,
numAddr:String,
numName:String,
numTel:String,

initialize : function (Gmap, Si){
this.objMap=Gmap;
this.numNo=Si.no;
this.numId=Si.id;
this.numLat=Si.lat;
this.numLon=Si.lng;
this.numZip=Si.zip;
this.numAddr=Si.addr;
this.numName=Si.name;
this.numTel=Si.tel;
}
,
marker : function () {
this.point();
this.objIcon=new GIcon();
this.objIcon.image="../images/p/marker"+this.numNo+".png";
this.objIcon.shadow="../images/shadow50.png";
this.objIcon.iconSize=new GSize(20, 34);
this.objIcon.shadowSize=new GSize(37, 34);
this.objIcon.iconAnchor=new GPoint(10, 34);
this.objIcon.infoWindowAnchor=new GPoint(5, 1);
this.objMarker=new GMarker(this.objPoint,this.objIcon);
GEvent.addListener(this.objMarker,"click",this.infoWin.bind(this));
}
,
point : function () {
this.objPoint=new GLatLng(this.numLat,this.numLon);
}
,
draw : function(){
this.objMap.addOverlay(this.objMarker);
}
,
infoWin : function(){
if (this.objClick) {
var offset = new GSize(10, -34);
//var html='<div class="shopinfo">';
var html='<div>'+this.numName+'</div>';
html+='<div>〒'+this.numZip+'</div>';
html+='<div>'+this.numAddr+'</div>';
html+='<div>tel:'+this.numTel+'</div>';
html+='<div><a href="javascript:void(0);" OnClick="view('+this.numId+');">詳細を見る</a></div>';
//html+='<div><a href="http://www.golf-links.jp/item/?i='+this.numId+'" target="_blank">詳細を見る</a></div>';
//html+='</div>';
this.objMap.openInfoWindowHtml(this.objPoint, html, offset);
}
}
,
eventListener : function(act){
this.objClick=act;
}

}

function g_Point(lon, lat, zoom) {
var point = new GPoint(lon, lat);
map.centerAndZoom(point, parseInt(zoom));
}

