/*--------------------------------------------------
UKISA.WIDGET.MULTIMAP
Version:   0.0.2
Generated: 21/2/2011
--------------------------------------------------*/
var UKISA=UKISA||{};UKISA.site=UKISA.site||{};UKISA.site.Multimap=function(b,a){this.canvas=document.getElementById(b);this.viewer;this.config={country:"GB",label:"",zoom:15,iconSrc:"/web/images/global/multimap_location.png",iconSize:[32,32],iconAnchor:[16,16],postCode:""};for(var c in a){if(typeof this.config[c]!=="undefined"){this.config[c]=a[c]}}return this.init()};UKISA.site.Multimap.prototype={init:function(){var a,b;if(!this.canvas){this.log("No canvas found.");return this}a=this;b=function(g,i,c,d){var e,h,j,f;e=a.config;j=a.viewer.getCurrentPosition();f=new MMIcon(e.iconSrc);f.iconSize=new MMDimensions(e.iconSize[0],e.iconSize[1]);f.iconAnchor=new MMPoint(e.iconAnchor[0],e.iconAnchor[1]);a.viewer.createMarker(j,{label:e.label,icon:f});a.viewer.addWidget(new MMSmallPanZoomWidget());a.viewer.addWidget(new MMMapTypeWidget())};this.viewer=new MultimapViewer(this.canvas);this.viewer.addEventHandler("endGeocode",b);this.viewer.drawAndPositionMap(new MMLocation(new MMAddress({postal_code:this.config.postCode,country_code:this.config.country}),this.config.zoom));return this},log:function(a){if(window.console){console.log(a)}}};
