var MapIconMaker={};MapIconMaker.createMarkerIcon=function(e){var a=e.width||32,b=e.height||32,g=e.primaryColor||"#ff0000",i=e.strokeColor||"#000000",h=e.cornerColor||"#ffffff",j="http://chart.apis.google.com/chart?cht=mm",d=j+"&chs="+a+"x"+b+"&chco="+h.replace("#","")+","+g.replace("#","")+","+i.replace("#","")+"&ext=.png",c=new GIcon(G_DEFAULT_ICON);c.image=d;c.iconSize=new GSize(a,b);c.shadowSize=new GSize(Math.floor(a*1.6),b);c.iconAnchor=new GPoint(a/2,b);c.infoWindowAnchor=new GPoint(a/2,Math.floor(b/12));c.printImage=d+"&chof=gif";c.mozPrintImage=d+"&chf=bg,s,ECECD8&chof=gif";d=j+"&chs="+a+"x"+b+"&chco="+h.replace("#","")+","+g.replace("#","")+","+i.replace("#","");c.transparent=d+"&chf=a,s,ffffff11&ext=.png";c.imageMap=[a/2,b,7/16*a,5/8*b,5/16*a,7/16*b,7/32*a,5/16*b,5/16*a,1/8*b,1/2*a,0,11/16*a,1/8*b,25/32*a,5/16*b,11/16*a,7/16*b,9/16*a,5/8*b];for(var f=0;f<c.imageMap.length;f++)c.imageMap[f]=parseInt(c.imageMap[f]);return c};MapIconMaker.createFlatIcon=function(b){var d=b.width||32,c=b.height||32,l=b.primaryColor||"#ff0000",m=b.shadowColor||"#000000",s=MapIconMaker.escapeUserText_(b.label)||"",n=b.labelColor||"#000000",o=b.labelSize||0,t=b.shape||"circle",i=t==="circle"?"it":"itr",p="http://chart.apis.google.com/chart?cht="+i,f=p+"&chs="+d+"x"+c+"&chco="+l.replace("#","")+","+m.replace("#","")+"ff,ffffff01&chl="+s+"&chx="+n.replace("#","")+","+o,a=new GIcon(G_DEFAULT_ICON);a.image=f+"&chf=bg,s,00000000&ext=.png";a.iconSize=new GSize(d,c);a.shadowSize=new GSize(0,0);a.iconAnchor=new GPoint(d/2,c/2);a.infoWindowAnchor=new GPoint(d/2,c/2);a.printImage=f+"&chof=gif";a.mozPrintImage=f+"&chf=bg,s,ECECD8&chof=gif";a.transparent=f+"&chf=a,s,ffffff01&ext=.png";a.imageMap=[];if(i==="itr")a.imageMap=[0,0,d,0,d,c,0,c];else for(var h=8,k=360/h,e=Math.min(d,c)/2,g=0;g<h+1;g++){var j=k*g*(Math.PI/180),q=e+e*Math.cos(j),r=e+e*Math.sin(j);a.imageMap.push(parseInt(q),parseInt(r))}return a};MapIconMaker.createLabeledMarkerIcon=function(a){var g=a.primaryColor||"#DA7187",h=a.strokeColor||"#000000",e=a.starPrimaryColor||"#FFFF00",f=a.starStrokeColor||"#0000FF",l=MapIconMaker.escapeUserText_(a.label)||"",i=a.labelColor||"#000000",b=a.addStar||false,j=b?"pin_star":"pin",k="http://chart.apis.google.com/chart?cht=d&chdp=mapsapi&chl=",c=k+j+"'i\\'["+l+"'-2'f\\hv'a\\]h\\]o\\"+g.replace("#","")+"'fC\\"+i.replace("#","")+"'tC\\"+h.replace("#","")+"'eC\\";if(b)c+=e.replace("#","")+"'1C\\"+f.replace("#","")+"'0C\\";c+="Lauto'f\\";var d=new GIcon(G_DEFAULT_ICON);d.image=c+"&ext=.png";d.iconSize=b?new GSize(23,39):new GSize(21,34);return d};MapIconMaker.escapeUserText_=function(a){if(a===undefined)return null;a=a.replace(/@/,"@@");a=a.replace(/\\/,"@\\");a=a.replace(/'/,"@'");a=a.replace(/\[/,"@[");a=a.replace(/\]/,"@]");return encodeURIComponent(a)}
