function gmapper(_1,_2){
this.map=_1;
this.geocoder=_2;
this.arrowIcon=new GIcon();
this.arrowIcon.iconSize=new GSize(24,24);
this.arrowIcon.shadowSize=new GSize(1,1);
this.arrowIcon.iconAnchor=new GPoint(12,12);
this.arrowIcon.infoWindowAnchor=new GPoint(0,0);
this.degreesPerRadian=180/Math.PI;
}
gmapper.prototype.drawCircle=function(_3,_4,_5,_6,_7,_8){
var _9=this.map.getZoom();
var _a=this.map.fromLatLngToDivPixel(_3);
var _b=_a;
var _c=_b.x+_4;
var _d=_b.y+_4;
_b=new GPoint(_c,_d);
var _e=Array();
with(Math){
_4=floor(sqrt(pow((_a.x-_b.x),2)+pow((_a.y-_b.y),2)));
for(var a=0;a<361;a+=10){
var _10=a*(PI/180);
var y=_a.y+_4*sin(_10);
var x=_a.x+_4*cos(_10);
var p=new GPoint(x,y);
var _14=this.map.fromDivPixelToLatLng(p,_9);
_e.push(_14);
if(_7!=""){
var _15=createMapMarker(_14,_7);
this.map.addOverlay(_15);
}
}
if(_8!=""){
var _16=new GPolygon(_e,_5,_6,0.8,_8,0.5);
}else{
var _16=new GPolygon(_e,_5,_6,0.8);
}
this.map.addOverlay(_16);
}
};
gmapper.prototype.createMarker=function(_17,_18){
var _19=new GIcon();
_19.image=_18[0];
_19.iconSize=new GSize(_18[1],_18[2]);
var _1a=_18[2]/100*10;
_1a=Math.ceil(_1a);
var _1b=_18[2]-_1a;
_19.iconAnchor=new GPoint(10,_1b);
var _1c=new GMarker(_17,_19);
return _1c;
};
gmapper.prototype.createMapMarker=function(_1d,_1e){
var _1f=new GIcon();
_1f.image=_1e[0];
_1f.iconSize=new GSize(_1e[1],_1e[2]);
var _20=_1e[2]/100*10;
_20=Math.ceil(_20);
var _21=_1e[2]-_20;
_1f.iconAnchor=new GPoint(10,_21);
var _22=_1e[2]/3;
_22=Math.floor(_22);
_1f.infoWindowAnchor=new GPoint(_22,2);
var _23=new GMarker(_1d,_1f);
GEvent.addListener(_23,"click",function(){
this.map.showMapBlowup(_23.getPoint());
});
return _23;
};
gmapper.prototype.createTabMarker=function(_24,_25,_26){
var _27=new GIcon();
_27.image=_26[0];
_27.iconSize=new GSize(_26[1],_26[2]);
var _28=_26[2]/100*11;
_28=Math.ceil(_28);
var _29=_26[2]-_28;
_27.iconAnchor=new GPoint(10,_29);
var _2a=_26[2]/3;
_27.infoWindowAnchor=new GPoint(_2a,2);
var _2b=new GMarker(_24,_27);
GEvent.addListener(_2b,"click",function(){
_2b.openInfoWindowTabsHtml(_25);
});
return _2b;
};
gmapper.prototype.createLinkMarker=function(_2c,_2d,_2e){
var _2f=new GIcon();
_2f.image=_2e[0];
_2f.iconSize=new GSize(_2e[1],_2e[2]);
var _30=_2e[2]/100*11;
_30=Math.ceil(_30);
var _31=_2e[2]-_30;
_2f.iconAnchor=new GPoint(10,_31);
var _32=_2e[2]/3;
_2f.infoWindowAnchor=new GPoint(_32,2);
var _33=new GMarker(_2c,_2f);
GEvent.addListener(_33,"click",function(){
window.location.href=_2d;
});
return _33;
};
gmapper.prototype.createOtherMarker=function(_34,_35,_36){
var _37=new GIcon();
_37.image=_36[0];
_37.iconSize=new GSize(_36[1],_36[2]);
subt=_36[2]/100*11;
subt=Math.ceil(subt);
var _38=_36[2]-subt;
_37.iconAnchor=new GPoint(10,_38);
var _39=_36[2]/3;
_39=Math.floor(_39);
_37.infoWindowAnchor=new GPoint(_39,2);
var _3a=new GMarker(_34,_37);
var _3b=_35;
GEvent.addListener(_3a,"click",function(){
_3a.openInfoWindowHtml(_3b);
});
return _3a;
};
gmapper.prototype.bearing=function(_3c,to){
var _3e=_3c.latRadians();
var _3f=_3c.lngRadians();
var _40=to.latRadians();
var _41=to.lngRadians();
var _42=-Math.atan2(Math.sin(_3f-_41)*Math.cos(_40),Math.cos(_3e)*Math.sin(_40)-Math.sin(_3e)*Math.cos(_40)*Math.cos(_3f-_41));
if(_42<0){
_42+=Math.PI*2;
}
_42=_42*this.degreesPerRadian;
_42=_42.toFixed(1);
return _42;
};
gmapper.prototype.arrowHead=function(_43){
var p1=_43[_43.length-1];
var p2=_43[_43.length-2];
var dir=bearing(p2,p1);
var dir=Math.round(dir/3)*3;
while(dir>=120){
dir-=120;
}
this.arrowIcon.image="/img/dir_"+dir+".png";
this.map.addOverlay(new GMarker(p1,arrowIcon));
};
gmapper.prototype.midArrows=function(_47){
for(var i=1;i<_47.length-1;i++){
var p1=_47[i-1];
var p2=_47[i+1];
var dir=bearing(p1,p2);
var dir=Math.round(dir/3)*3;
while(dir>=120){
dir-=120;
}
this.arrowIcon.image="/img/dir_"+dir+".png";
this.map.addOverlay(new GMarker(_47[i],arrowIcon));
}
};
gmapper.prototype.geocodeAddress=function(_4c,typ,_4e,_4f){
this.geocoder.getLatLng(_4c,function(_50){
if(!_50){
alert(_4c+" nicht gefunden");
}else{
var lat=_50.lat();
var lng=_50.lng();
this.map.setCenter(_50,_4f);
if(typ=="otherMarker"){
_4e=createOtherMarker(_50,_4c,_4e);
}else{
if(typ=="marker"){
_4e=createMarker(_50,_4e);
}else{
if(typ=="mapMarker"){
_4e=createMapMarker(_50,_4e);
}
}
}
this.map.addOverlay(_4e);
}
});
};
gmapper.prototype.getAdress=function(){
var _53=document.getElementById("adresse").value;
return _53;
};
gmapper.prototype.tilechk=function(){
paragraphs=this.map.getContainer().getElementsByTagName("p").length;
if(paragraphs>4){
this.map.zoomOut(false,true);
}
};
gmapper.prototype.wheelevent=function(e){
if(!e){
e=window.event;
}
if(e.preventDefault){
e.preventDefault();
}
e.returnValue=false;
};


