diff --git a/about/license.html b/about/license.html new file mode 100644 index 0000000..b955933 --- /dev/null +++ b/about/license.html @@ -0,0 +1,36 @@ +--- +layout: default +title: License Issues +headline: Reading the fine print +tagline: Why on earth have you chosen the GPLv3? +headbg: /img/notiles.jpg +--- + +
+ +
+

Can I use Kartograph in proprietary software?

+ +

A lot of people asked. I chose the GNU Public License because I really like the idea of free software. I spent a lot of time into developing Kartograph and I'd really love to see other people using Kartograph. In fact, that's why I decided to release it open source. The GPL is not a non-commercial license. You're totally free to build your business on top of it. If you modify Kartograph in any way, you're required to publish your modified version under GPL again.

+ +

In the following sections I will try to break down a few use cases.

+ +

Kartograph.js

+ +

The major use case of Kartograph.js is to be loaded into a website to display a map and allow the user to interact with it. It does not matter what kind of website you're working on, may it be a dashboard, a web shop or whatever. You never ever need to open source your entire website. This is what the GPL refers to as distribution of non-modified versions.

+ +

Now let's say you found a bug in Kartograph.js and fixed in in your local version. If you now want to distribute it along with your website, the GPL requires you to publish the modified version of Kartograph.js under GPL again. Just fork it on Github, push your bugfix to your fork and everything is fine. The same is true if you added a new, awesome feature to Kartograph.js. Just share the new feature with the world and be happy to have contributed to a free software.

+ + +

Kartograph.py

+ +

The most typical use case of Kartograph.py is to generate a nice SVG map, and you're free to do that. The resulting SVG files do not have to be licensed under GPL, but depending on the source geodata you have used to generate them, there might be other license issues to consider.

+ +

If you modify your local version of Kartograph, you're still free to generate SVG maps and use them in any website, since that's not considered as redistribution of Kartograph.py. However, if you release Kartograph.py.

+ +

The AGPL (under which Kartograph.py is licensed) makes sure that . So if you create a nice web service which generates SVG maps (which would be awesome) and use a modified version of Kartograph.py, then you would be required to release the modified version under GPL.

+ +
+
+ + diff --git a/js/kartograph.js b/js/kartograph.js index 4f9de69..8979946 100644 --- a/js/kartograph.js +++ b/js/kartograph.js @@ -47,7 +47,7 @@ kartograph = root.$K = (_ref = root.kartograph) != null ? _ref : root.kartograph = {}; - kartograph.version = "0.1.7"; + kartograph.version = "0.1.9"; __verbose__ = false && (typeof console !== "undefined" && console !== null); @@ -1230,7 +1230,7 @@ }; /* - kartograph - a svg mapping library + kartograph - a svg mapping library Copyright (C) 2011 Gregor Aisch This program is free software: you can redistribute it and/or modify @@ -1416,29 +1416,38 @@ /* loads a path from a SVG path string */ - var closed, contour, contour_str, contours, cx, cy, path_str, pt_str, r, res, sep, type, x, y, _i, _j, _len, _len2, _ref10, _ref11, _ref9; + var closed, cmd, contour, contours, cx, cy, path_data, path_str, r, res, sep, type, _i, _len; contours = []; type = path.nodeName; res = null; if (type === "path") { path_str = path.getAttribute('d').trim(); - closed = path_str[path_str.length - 1] === "Z"; + path_data = Raphael.parsePathString(path_str); + closed = path_data[path_data.length - 1] === "Z"; sep = closed ? "Z M" : "M"; - path_str = path_str.substring(1, path_str.length - (closed ? 1 : 0)); - _ref9 = path_str.split(sep); - for (_i = 0, _len = _ref9.length; _i < _len; _i++) { - contour_str = _ref9[_i]; - contour = []; - if (contour_str !== "") { - _ref10 = contour_str.split('L'); - for (_j = 0, _len2 = _ref10.length; _j < _len2; _j++) { - pt_str = _ref10[_j]; - _ref11 = pt_str.split(','), x = _ref11[0], y = _ref11[1]; - contour.push([Number(x), Number(y)]); + contour = []; + for (_i = 0, _len = path_data.length; _i < _len; _i++) { + cmd = path_data[_i]; + if (cmd.length === 0) continue; + if (cmd[0] === "M") { + if (contour.length > 2) { + contours.push(contour); + contour = []; + } + contour.push([cmd[1], cmd[2]]); + } else if (cmd[0] === "L") { + contour.push([cmd[1], cmd[2]]); + } else if (cmd[0] === "Z") { + if (contour.length > 2) { + contours.push(contour); + contour = []; } - contours.push(contour); } } + if (contour.length > 2) { + contours.push(contour); + contour = []; + } res = new kartograph.geom.Path(type, contours, closed); } else if (type === "circle") { cx = path.getAttribute("cx"); @@ -3168,7 +3177,7 @@ me = this; layer_id = (_ref12 = opts.layer) != null ? _ref12 : me.layerIds[me.layerIds.length - 1]; if (!me.layers.hasOwnProperty(layer_id)) { - warn('choropleth error: layer "' + layer_ihad + '" not found'); + warn('choropleth error: layer "' + layer_id + '" not found'); return; } data = opts.data; diff --git a/js/kartograph.min.js b/js/kartograph.min.js index a8f173b..74c3617 100644 --- a/js/kartograph.min.js +++ b/js/kartograph.min.js @@ -17,5 +17,5 @@ * along with this program. If not, see . * * - */(function(){var a,b,c,d,e,f,g,h,i,j,k,l,n,o,p,q,r,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,bA,bB,bC,bD,bE,bF,bG,bH,bI,bJ,bK,bL,bM,bN,bO,bP,bQ,bR,bS=function(a,b){return function(){return a.apply(b,arguments)}},bT=Object.prototype.hasOwnProperty,bU=function(a,b){function d(){this.constructor=a}for(var c in b)bT.call(b,c)&&(a[c]=b[c]);d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype;return a};bw=typeof exports!="undefined"&&exports!==null?exports:this,bp=bw.$K=(bF=bw.kartograph)!=null?bF:bw.kartograph={},bp.version="0.1.7",bC=!1,by=function(a){if(bC)return console.warn("kartograph ("+bp.version+"): ",a)},bq=function(a){if(bC)return console.log("kartograph ("+bp.version+"): ",a)},(bK=(bD=String.prototype).trim)==null&&(bD.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){"use strict";if(this==null)throw new TypeError;var b=Object(this),c=b.length>>>0;if(c===0)return-1;var d=0;arguments.length>0&&(d=Number(arguments[1]),d!=d?d=0:d!=0&&d!=Infinity&&d!=-Infinity&&(d=(d>0||-1)*Math.floor(Math.abs(d))));if(d>=c)return-1;var e=d>=0?d:Math.max(c-Math.abs(d),0);for(;es.left&&a.tops.top},a.prototype.inside=function(a,b){var c;c=this;return a>=c.left&&a<=c.right&&b>=c.top&&b<=c.bottom},a.prototype.join=function(a){var b;b=this,b.update(a.left,a.top),b.update(a.right,a.bottom);return this};return a}(),c.fromXML=function(a){var b,c,d,e;d=Number(a.getAttribute("x")),e=Number(a.getAttribute("y")),c=Number(a.getAttribute("w")),b=Number(a.getAttribute("h"));return new bp.BBox(d,e,c,b)},bp.BBox=c,(bL=bp.geom)==null&&(bp.geom={}),(bM=(bE=bp.geom).clipping)==null&&(bE.clipping={}),k=function(){function f(){}var a,b,c,d,e;b=0,c=1,d=2,a=4,e=8,f.prototype.compute_out_code=function(a,b,c){var d,e;e=this,d=e.INSIDE,ba.right&&(d|=e.RIGHT),ca.bottom&&(d|=e.BOTTOM);return d},f.prototype.clip=function(a,b,c,d,e){var f,g,h,i,j,k,l;j=this,g=j.compute_out_code(a,b,c),h=j.compute_out_code(a,d,e),f=False;while(True){if(!(g|h)){f=True;break}if(g&h)break;i=code===0?h:g,i&j.TOP?(k=b+(d-b)*(a.top-c)/(e-c),l=a.top):i&j.BOTTOM?(k=b+(d-b)*(a.bottom-c)/(e-c),l=a.bottom):i&j.RIGHT?(l=c+(e-c)*(a.right-b)/(d-b),k=a.right):i&j.LEFT&&(l=c+(e-c)*(a.left-b)/(d-b),k=a.left),i===g?(b=k,c=l,g=j.compute_out_code(a,b,c)):(d=k,e=l,h=j.compute_out_code(a,d,e))}return f?[b,c,d,e]:null};return f}(),bp.geom.clipping.CohenSutherland=k,A=function(){function a(a,b,d){var e,f;f=this,f.container=e=$(a),b==null&&(b=e.width()),d==null&&(d=e.height()),d===0&&(d=b*.5),f.viewport=new c(0,0,b,d),f.paper=f.createSVGLayer(),f.markers=[],f.pathById={},f.container.addClass("kartograph")}a.prototype.createSVGLayer=function(a){var b,c,d,e,f,g,h,i;e=this,(i=e._layerCnt)==null&&(e._layerCnt=0),d=e._layerCnt++,h=e.viewport,c=e.container,f=Raphael(c[0],h.width,h.height),g=$(f.canvas),g.css({position:"absolute",top:"0px",left:"0px","z-index":d+5}),c.css("position")==="static"&&c.css({position:"relative",height:h.height+"px"}),g.addClass(a),b=$("desc",f.canvas).text(),$("desc",f.canvas).text(b.replace("with ","with kartograph "+bp.version+" and "));return f},a.prototype.createHTMLLayer=function(a){var b,c,d,e,f,g;e=this,f=e.viewport,b=e.container,(g=e._layerCnt)==null&&(e._layerCnt=0),d=e._layerCnt++,c=$('
'),c.css({position:"absolute",top:"0px",left:"0px",width:f.width+"px",height:f.height+"px","z-index":d+5}),b.append(c);return c},a.prototype.loadMap=function(a,b,c){var d,e,f;d=this,d.clear(),d.opts=c!=null?c:{},(f=(e=d.opts).zoom)==null&&(e.zoom=1),d.mapLoadCallback=b,d._lastMapUrl=a,d.cacheMaps&&bp.__mapCache[a]!=null?d._mapLoaded(bp.__mapCache[a]):$.ajax({url:a,dataType:"text",success:d._mapLoaded,context:d,error:function(a,b,c){return by(a,b,c)}})},a.prototype._mapLoaded=function(a){var b,c,d,e,f,g,h,i,j,k,l;e=this,e.cacheMaps&&((i=bp.__mapCache)==null&&(bp.__mapCache={}),bp.__mapCache[e._lastMapUrl]=a);try{a=$(a)}catch(m){by("something went horribly wrong while parsing svg");return}e.svgSrc=a,h=e.viewport,b=$("view",a)[0],e.viewAB=c=bp.View.fromXML(b),f=(j=e.opts.padding)!=null?j:0,d=(k=e.opts.halign)!=null?k:"center",g=(l=e.opts.valign)!=null?l:"center",e.viewBC=new bp.View(c.asBBox(),h.width,h.height,f,d,g),e.proj=bp.Proj.fromXML($("proj",b)[0]);return e.mapLoadCallback(e)},a.prototype.addLayer=function(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;h=this,(q=h.layerIds)==null&&(h.layerIds=[]),(r=h.layers)==null&&(h.layers={}),bB(a)==="object"?(i=a,a=i.id,b=i.className,c=i.key,l=i.title):i={},b==null&&(b=a),j=$("#"+a,h.svgSrc);if(j.length!==0){g=new J(b,c,h,i.filter),d=$("*",j[0]);for(m=0,o=d.length;m0&&(h.layers[b]=g,h.layerIds.push(b)),e=["click"];for(n=0,p=e.length;n');return b()},a.prototype.applyStyles=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;e=this;if(e.styles==null)return a;(n=e._pathTypes)==null&&(e._pathTypes=["path","circle","rectangle","ellipse"]),(o=e._regardStyles)==null&&(e._regardStyles=["fill","stroke","fill-opacity","stroke-width","stroke-opacity"]);for(h in e.styles){f=h,p=f.split(",");for(j=0,l=p.length;j1)continue;f=f[0].split("."),c=f.slice(1);if(c.length>0&&c.indexOf(b)<0)continue;f=f[0];if(e._pathTypes.indexOf(f)>=0&&f!==a.type)continue;g=e.styles[h],q=e._regardStyles;for(k=0,m=q.length;k=p;0<=p?g++:g--)e=a.attributes[g],e.name.substr(0,5)==="data-"&&(m=e.value,o=Number(m),m.trim()!==""&&o===m&&!isNaN(o)&&(m=o),f[e.name.substr(5)]=m);h.data=f,bB(d)==="string"?k=d:bB(d)==="function"&&(k=d(f)),k!=null&&h.svgPath.attr("title",k)}a.prototype.setView=function(a){var b,c,d;b=this,c=a.projectPath(b.path),b.vpath=c;if(b.path.type==="path"){d=c.svgString();return b.svgPath.attr({path:d})}if(b.path.type==="circle")return b.svgPath.attr({cx:c.x,cy:c.y,r:c.r})},a.prototype.remove=function(){var a;a=this;return a.svgPath.remove()};return a}(),bw=typeof exports!="undefined"&&exports!==null?exports:this,bp=(bO=bw.kartograph)!=null?bO:bw.kartograph={},bp.parsecss=function(a,b){var c,d,e,f,g,h,i,j;f={},a=bs(a),j=a.split("`b%");for(h=0,i=j.length;h=g;0<=g?c++:c--)a+=b[c][0]*b[c+1][1]-b[c+1][0]*b[c][1];a*=.5,a=a,d.areas.push(a),d._area+=a}return d._area},a.prototype.centroid=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;m=this;if(m._centroid!=null)return m._centroid;b=m.area(),d=e=0;for(h=0,w=m.contours.length-1;0<=w?h<=w:h>=w;0<=w?h++:h--){c=m.contours[h],a=m.areas[h],r=s=0,k=c.length,t=[],p=0;for(i=0,u=k-1;0<=u?i<=u:i>=u;0<=u?i++:i--)n=c[i],o=c[(i+1)%k],f=o[0]-n[0],g=o[1]-n[1],l=Math.sqrt(f*f+g*g),t.push(l),p+=l;for(i=0,v=k-1;0<=v?i<=v:i>=v;0<=v?i++:i--)n=c[i],o=c[(i+1)%k],q=t[i]/p,r+=q*n[0],s+=q*n[1];j=a/b,d+=r*j,e+=s*j}m._centroid=[d,e];return m._centroid},a.prototype.isInside=function(a,b){var c,d,e,f,g;f=this,c=f._bbox;if(ac[2]||bc[3])return!1;for(e=0,g=f.contours.length-1;0<=g?e<=g:e>=g;0<=g?e++:e--){d=f.contours[e];if(bz(d,[a,b]))return!0}return!1};return a}(),bp.geom.Path=R,j=function(){function a(b,c,d){this.x=b,this.y=c,this.r=d,a.__super__.constructor.call(this,"circle",null,!0)}bU(a,R),a.prototype.toSVG=function(a){var b;b=this;return a.circle(b.x,b.y,b.r)},a.prototype.centroid=function(){var a;a=this;return[a.x,a.y]},a.prototype.area=function(){var a;a=this;return Math.PI*a.r*m.r};return a}(),bp.geom.Circle=j,R.fromSVG=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;e=[],m=a.nodeName,k=null;if(m==="path"){h=a.getAttribute("d").trim(),b=h[h.length-1]==="Z",l=b?"Z M":"M",h=h.substring(1,h.length-(b?1:0)),v=h.split(l);for(p=0,r=v.length;p=t;0<=t?d++:d--){q=l.points[d],g=q[0],h=q[1],r=l.points[d+1],i=r[0],j=r[1];try{s=c(b,g,h,i,j),m=s[0],o=s[1],n=s[2],p=s[3],e=!0,k.push([m,o]),(i!==n||j!==o||d===len(l.points)-2)&&k.push([n,p])}catch(u){e&&k.length>1&&(f.push(new a(k)),k=[]),e=!1}}k.length>1&&f.push(new a(k));return f},a.prototype.toSVG=function(){var a,b,c,d,e,f,g,h;b=this,a=[],h=b.points;for(e=0,f=h.length;e=p;0<=p?f++:f--){l=a[f][0]-b[0],n=a[f][1]-b[1],m=a[(f+1)%g][0]-b[0],o=a[(f+1)%g][1]-b[1],i=d(n,l),j=d(o,m),e=j-i;while(e>h)e-=k;while(e<-h)e+=k;c+=e}return Math.abs(c)>=h},bw=typeof exports!="undefined"&&exports!==null?exports:this,bp=(bR=bw.kartograph)!=null?bR:bw.kartograph={},bA=bp.proj={},Function.prototype.bind=function(a){var b;b=this;return function(){return b.apply(a,arguments)}},T=function(){function a(a){var b,c,d;b=this,b.lon0=(c=a.lon0)!=null?c:0,b.lat0=(d=a.lat0)!=null?d:0,b.PI=Math.PI,b.HALFPI=b.PI*.5,b.QUARTERPI=b.PI*.25,b.RAD=b.PI/180,b.DEG=180/b.PI,b.lam0=b.rad(this.lon0),b.phi0=b.rad(this.lat0),b.minLat=-90,b.maxLat=90}a.parameters=[],a.title="Projection",a.prototype.rad=function(a){return a*this.RAD},a.prototype.deg=function(a){return a*this.DEG},a.prototype.plot=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;b==null&&(b=!0),f=[],c=!0;for(j=0,k=a.length;j=h;g<=h?b++:b--)d.push(e(180,b));for(c=180;c>=-180;c--)d.push(e(c,f.minLat));for(b=i=f.minLat,j=f.maxLat;i<=j?b<=j:b>=j;i<=j?b++:b--)d.push(e(-180,b));f.lon0=a;return d},a.prototype.world_bbox=function(){var a,b,c,d,e,f;b=this.project.bind(this),d=this.sea(),a=new bp.BBox;for(e=0,f=d.length;e=g;0<=g?c++:c--)b=a.attributes[c],b.name!=="id"&&(e[b.name]=b.value);f=new bp.proj[d](e),f.name=d;return f},bp.Proj=T,n=function(){function a(b){var c,d,e;b==null&&(b={}),c=this,c.flip=Number((d=b.flip)!=null?d:0),c.flip===1&&(b.lon0=(e=-b.lon0)!=null?e:0),a.__super__.constructor.call(this,b)}bU(a,T),a.parameters=["lon0","flip"],a.title="Cylindrical Projection",a.prototype._visible=function(a,b){return!0},a.prototype.clon=function(a){a-=this.lon0,a<-180?a+=360:a>180&&(a-=360);return a},a.prototype.ll=function(a,b){return this.flip===1?[-a,-b]:[a,b]};return a}(),q=function(){function a(){a.__super__.constructor.apply(this,arguments)}bU(a,n),a.title="Equirectangular Projection",a.prototype.project=function(a,b){var c;c=this.ll(a,b),a=c[0],b=c[1],a=this.clon(a);return[a*Math.cos(this.phi0)*1e3,b*-1*1e3]};return a}(),bA.lonlat=q,h=function(){function a(b){var c;a.__super__.constructor.call(this,b),this.lat1=(c=b.lat1)!=null?c:0,this.phi1=this.rad(this.lat1)}bU(a,n),a.parameters=["lon0","lat1","flip"],a.title="Cylindrical Equal Area",a.prototype.project=function(a,b){var c,d,e,f,g;g=this.ll(a,b),a=g[0],b=g[1],c=this.rad(this.clon(a)),d=this.rad(b*-1),e=c*Math.cos(this.phi1),f=Math.sin(d)/Math.cos(this.phi1);return[e*1e3,f*1e3]};return a}(),bA.cea=h,t=function(){function a(b){b.lat1=45,a.__super__.constructor.call(this,b)}bU(a,h),a.title="Gall-Peters Projection",a.parameters=["lon0","flip"];return a}(),bA.gallpeters=t,x=function(){function a(b){b.lat1=37.7,a.__super__.constructor.call(this,b)}bU(a,h),a.title="Hobo-Dyer Projection",a.parameters=["lon0","flip"];return a}(),bA.hobodyer=x,e=function(){function a(b){b.lat1=30,a.__super__.constructor.call(this,b)}bU(a,h),a.title="Behrmann Projection",a.parameters=["lon0","flip"];return a}(),bA.behrmann=e,d=function(){function a(b){b.lat1=50,a.__super__.constructor.call(this,b)}bU(a,h),a.title="Balthasart Projection",a.parameters=["lon0","flip"];return a}(),bA.balthasart=d,L=function(){function a(b){a.__super__.constructor.call(this,b),this.minLat=-85,this.maxLat=85}bU(a,n),a.title="Mercator Projection",a.prototype.project=function(a,b){var c,d,e,f,g,h,i;f=this,i=f.ll(a,b),a=i[0],b=i[1],d=Math,c=f.rad(f.clon(a)),e=f.rad(b*-1),g=c*1e3,h=d.log((1+d.sin(e))/d.cos(e))*1e3;return[g,h]};return a}(),bA.mercator=L,V=function(){function a(){a.__super__.constructor.apply(this,arguments)}bU(a,n),a.title="Pseudo-Cylindrical Projection";return a}(),N=function(){function a(b){var c;a.__super__.constructor.call(this,b),c=this,c.A0=.8707,c.A1=-0.131979,c.A2=-0.013791,c.A3=.003971,c.A4=-0.001529,c.B0=1.007226,c.B1=.015085,c.B2=-0.044475,c.B3=.028874,c.B4=-0.005916,c.C0=c.B0,c.C1=3*c.B1,c.C2=7*c.B2,c.C3=9*c.B3,c.C4=11*c.B4,c.EPS=1e-11,c.MAX_Y=.8707*.52*Math.PI;return}bU(a,V),a.title="Natural Earth Projection",a.prototype.project=function(a,b){var c,d,e,f,g,h,i,j;g=this,j=g.ll(a,b),a=j[0],b=j[1],c=g.rad(g.clon(a)),d=g.rad(b*-1),e=d*d,f=e*e,h=c*(g.A0+e*(g.A1+e*(g.A2+f*e*(g.A3+e*g.A4))))*180+500,i=d*(g.B0+e*(g.B1+f*(g.B2+g.B3*e+g.B4*f)))*180+270;return[h,i]};return a}(),bA.naturalearth=N,ba=function(){function a(b){var c;a.__super__.constructor.call(this,b),c=this,c.X=[1,-5.67239e-12,-0.0000715511,311028e-11,.9986,-0.000482241,-0.000024897,-0.00000133094,.9954,-0.000831031,-0.000044861,-9.86588e-7,.99,-0.00135363,-0.0000596598,367749e-11,.9822,-0.00167442,-0.0000044975,-0.00000572394,.973,-0.00214869,-0.0000903565,1.88767e-8,.96,-0.00305084,-0.0000900732,164869e-11,.9427,-0.00382792,-0.0000653428,-0.00000261493,.9216,-0.00467747,-0.000104566,48122e-10,.8962,-0.00536222,-0.0000323834,-0.00000543445,.8679,-0.00609364,-0.0001139,332521e-11,.835,-0.00698325,-0.0000640219,9.34582e-7,.7986,-0.00755337,-0.0000500038,9.35532e-7,.7597,-0.00798325,-0.0000359716,-0.00000227604,.7186,-0.00851366,-0.000070112,-0.00000863072,.6732,-0.00986209,-0.000199572,191978e-10,.6213,-0.010418,883948e-10,624031e-11,.5722,-0.00906601,181999e-9,624033e-11,.5322,0,0,0],c.Y=[0,.0124,3.72529e-10,1.15484e-9,.062,.0124001,1.76951e-8,-5.92321e-9,.124,.0123998,-7.09668e-8,2.25753e-8,.186,.0124008,2.66917e-7,-8.44523e-8,.248,.0123971,-9.99682e-7,3.15569e-7,.31,.0124108,373349e-11,-0.0000011779,.372,.0123598,-0.000013935,439588e-11,.434,.0125501,520034e-10,-0.0000100051,.4968,.0123198,-0.0000980735,922397e-11,.5571,.0120308,402857e-10,-0.0000052901,.6176,.0120369,-0.0000390662,7.36117e-7,.6769,.0117015,-0.0000280246,-8.54283e-7,.7346,.0113572,-0.0000408389,-5.18524e-7,.7903,.0109099,-0.0000486169,-0.0000010718,.8435,.0103433,-0.0000646934,5.36384e-9,.8936,.00969679,-0.0000646129,-0.00000854894,.9394,.00840949,-0.000192847,-0.00000421023,.9761,.00616525,-0.000256001,-0.00000421021,1,0,0,0],c.NODES=18,c.FXC=.8487,c.FYC=1.3523,c.C1=11.459155902616464,c.RC1=.08726646259971647,c.ONEEPS=1.000001,c.EPS=1e-8;return}bU(a,V),a.title="Robinson Projection",a.prototype._poly=function(a,b,c){return a[b]+c*(a[b+1]+c*(a[b+2]+c*a[b+3]))},a.prototype.project=function(a,b){var c,d,e,f,g,h,i,j;g=this,j=g.ll(a,b),a=j[0],b=j[1],a=g.clon(a),d=g.rad(a),e=g.rad(b*-1),f=Math.abs(e),c=Math.floor(f*g.C1),c>=g.NODES&&(c=g.NODES-1),f=g.deg(f-g.RC1*c),c*=4,h=g._poly(g.X,c,f)*g.FXC*d,i=g._poly(g.Y,c,f)*g.FYC,e<0&&(i=-i);return[h,i]};return a}(),bA.robinson=ba,o=function(){function a(b){var c;a.__super__.constructor.call(this,b),c=this,c.C_x=.4222382003157712,c.C_y=1.3265004281770023,c.RC_y=.7538633073600218,c.C_p=3.5707963267948966,c.RC_p=.2800495767557787,c.EPS=1e-7,c.NITER=6}bU(a,V),a.title="Eckert IV Projection",a.prototype.project=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;h=this,m=h.ll(a,b),a=m[0],b=m[1],f=h.rad(h.clon(a)),g=h.rad(b*-1),i=h.C_p*Math.sin(g),c=g*g,g*=.895168+c*(.0218849+c*.00826809),e=h.NITER;while(e>0){d=Math.cos(g),j=Math.sin(g),c=(g+j*(d+2)-i)/(1+d*(d+2)-j*j),g-=c;if(Math.abs(c)=0?h.HALFPI:-h.HALFPI:i*=.5,k=1e3*h.cx*f*g.cos(i),l=1e3*h.cy*g.sin(i);return[k,l*-1]};return a}(),bA.mollweide=M,bk=function(){function a(b){a.__super__.constructor.call(this,b,1.0471975511965976)}bU(a,M),a.title="Wagner IV Projection";return a}(),bA.wagner4=bk,bl=function(){function a(b){a.__super__.constructor.call(this,b,null,.90977,1.65014,3.00896)}bU(a,M),a.title="Wagner V Projection";return a}(),bA.wagner5=bl,I=function(){function c(){c.__super__.constructor.apply(this,arguments)}var a,b;bU(c,V),b=-89,a=89,c.parameters=["lon0","lat0","flip"],c.title="Loximuthal Projection (equidistant)",c.prototype.project=function(a,b){var c,d,e,f,g,h,i;e=this,i=e.ll(a,b),a=i[0],b=i[1],d=Math,c=e.rad(e.clon(a)),f=e.rad(b),f===e.phi0?g=c*d.cos(e.phi0):g=c*(f-e.phi0)/(d.log(d.tan(e.QUARTERPI+f*.5))-d.log(d.tan(e.QUARTERPI+e.phi0*.5))),g*=1e3,h=1e3*(f-e.phi0);return[g,h*-1]};return c}(),bA.loximuthal=I,i=function(){function f(){f.__super__.constructor.apply(this,arguments)}var a,b,c,d,e;bU(f,V),f.title="Canters Modified Sinusoidal I",f.parameters=["lon0"],a=1.1966,b=-0.129,c=3*b,d=-0.0076,e=5*d,f.prototype.project=function(f,g){var h,i,j,k,l,m;h=this,m=h.ll(f,g),f=m[0],g=m[1],f=h.rad(h.clon(f)),g=h.rad(g),k=g*g,l=k*k,i=1e3*f*Math.cos(g)/(a+c*k+e*l),j=1e3*g*(a+b*k+d*l);return[i,j*-1]};return f}(),bA.canters1=i,w=function(){function n(a){n.__super__.constructor.call(this,a)}var a,b,c,d,e,f,g,h,i,j,k,l,m;bU(n,V),n.title="Hatano Projection",g=20,c=1e-7,h=1.000001,a=2.67595,b=2.43763,i=.3736990601468637,j=.4102345310814193,e=1.75859,f=1.93052,l=.5686373742600607,m=.5179951515653813,d=.85,k=1.1764705882352942,n.prototype.project=function(h,i){var j,k,l,m,n,o,p,q,r;m=this,r=m.ll(h,i),h=r[0],i=r[1],l=m.rad(m.clon(h)),n=m.rad(i),j=Math.sin(n)*(n<0?b:a);for(k=g;k>=1;k+=-1){o=(n+Math.sin(n)-j)/(1+Math.cos(n)),n-=o;if(Math.abs(o)c.lat1?c.p1.project(a,b):c.p0.project(a,b)};return a}(),bA.goodehomolosine=v,O=function(){function b(a){b.__super__.constructor.call(this,a),this.r=this.HALFPI*100}var a;bU(b,V),b.title="Nicolosi Globular Projection",b.parameters=["lon0"],a=1e-10,b.prototype._visible=function(a,b){var c;c=this,a=c.clon(a);return a>-90&&a<90},b.prototype.project=function(b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p;h=this,p=h.ll(b,c),b=p[0],c=p[1],f=h.rad(h.clon(b)),j=h.rad(c),Math.abs(f)=0},a.prototype._truncate=function(a,b){var c,d,e,f,g;c=Math,d=this.r,e=c.atan2(b-d,a-d),f=d+d*c.cos(e),g=d+d*c.sin(e);return[f,g]},a.prototype.sea=function(){var a,b,c,d;b=[],d=this.r,a=Math;for(c=0;c<=360;c++)b.push([d+a.cos(this.rad(c))*d,d+a.sin(this.rad(c))*d]);return b},a.prototype.world_bbox=function(){var a;a=this.r;return new bp.BBox(0,0,a*2,a*2)};return a}(),P=function(){function a(){a.__super__.constructor.apply(this,arguments)}bU(a,b),a.title="Orthographic Projection",a.prototype.project=function(a,b){var c,d,e,f,g,h,i,j;f=this,e=Math,d=f.to_elevation(b),c=f.to_azimuth(a),h=f.r*e.cos(d)*e.sin(c-f.azimuth0),j=-f.r*(e.cos(f.elevation0)*e.sin(d)-e.sin(f.elevation0)*e.cos(d)*e.cos(c-f.azimuth0)),g=f.r+h,i=f.r+j;return[g,i]};return a}(),bA.ortho=P,B=function(){function a(b){a.__super__.constructor.call(this,b),this.scale=Math.sqrt(2)*.5}bU(a,b),a.title="Lambert Azimuthal Equal-Area Projection",a.prototype.project=function(a,b){var c,d,e,f,g,h,i,j,k,l;g=this.rad(b),e=this.rad(a),f=Math,h=f.sin,c=f.cos,d=f.pow(2/(1+h(this.phi0)*h(g)+c(this.phi0)*c(g)*c(e-this.lam0)),.5),d*=this.scale,j=this.r*d*c(g)*h(e-this.lam0),l=-this.r*d*(c(this.phi0)*h(g)-h(this.phi0)*c(g)*c(e-this.lam0)),i=this.r+j,k=this.r+l;return[i,k]};return a}(),bA.laea=B,bf=function(){function a(){a.__super__.constructor.apply(this,arguments)}bU(a,b),a.title="Stereographic Projection",a.prototype.project=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;h=this.rad(b),f=this.rad(a),g=Math,i=g.sin,c=g.cos,e=.5,d=2*e/(1+i(this.phi0)*i(h)+c(this.phi0)*c(h)*c(f-this. -lam0)),k=this.r*d*c(h)*i(f-this.lam0),m=-this.r*d*(c(this.phi0)*i(h)-i(this.phi0)*c(h)*c(f-this.lam0)),j=this.r+k,l=this.r+m;return[j,l]};return a}(),bA.stereo=bf,bb=function(){function a(b){var c,d,e,f,g,h,i,j;a.__super__.constructor.call(this,{lon0:0,lat0:0}),this.dist=(h=b.dist)!=null?h:3,this.up=this.rad((i=b.up)!=null?i:0),this.tilt=this.rad((j=b.tilt)!=null?j:0),this.scale=1,f=Number.MAX_VALUE,e=Number.MAX_VALUE*-1;for(c=0;c<=179;c++)for(d=0;d<=360;d++)g=this.project(d-180,c-90),f=Math.min(g[0],f),e=Math.max(g[0],e);this.scale=this.r*2/(e-f),a.__super__.constructor.call(this,b);return}bU(a,b),a.parameters=["lon0","lat0","tilt","dist","up"],a.title="Satellite Projection",a.prototype.project=function(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;c==null&&(c=0),m=this.rad(b),k=this.rad(a),l=Math,p=l.sin,f=l.cos,n=this.r,o=n*(c+6371)/3671,g=p(this.phi0)*p(m)+f(this.phi0)*f(m)*f(k-this.lam0),j=(this.dist-1)/(this.dist-g),j=(this.dist-1)/(this.dist-g),j*=this.scale,t=o*j*f(m)*p(k-this.lam0),w=-o*j*(f(this.phi0)*p(m)-p(this.phi0)*f(m)*f(k-this.lam0)),i=f(this.up),r=p(this.up),h=f(this.tilt),q=p(this.tilt),e=o*(this.dist-1),d=(w*i+t*r)*p(this.tilt/e)+h,u=(t*i-w*r)*f(this.tilt/d),x=(w*i+t*r)/d,s=n+u,v=n+x;return[s,v]},a.prototype._visible=function(a,b){var c,d,e,f;e=this.to_elevation(b),c=this.to_azimuth(a),f=Math,d=f.sin(e)*f.sin(this.elevation0)+f.cos(this.elevation0)*f.cos(e)*f.cos(c-this.azimuth0);return d>=1/this.dist},a.prototype.sea=function(){var a,b,c,d;b=[],d=this.r,a=Math;for(c=0;c<=360;c++)b.push([d+a.cos(this.rad(c))*d,d+a.sin(this.rad(c))*d]);return b};return a}(),bA.satellite=bb,p=function(){function a(){a.__super__.constructor.apply(this,arguments)}bU(a,b),a.title="Equidistant Azimuthal Projection",a.prototype.project=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;i=this,j=i.rad(b),g=i.rad(a),h=Math,k=h.sin,d=h.cos,e=k(this.phi0)*k(j)+d(this.phi0)*d(j)*d(g-this.lam0),c=h.acos(e),f=.325*c/k(c),m=this.r*f*d(j)*k(g-this.lam0),o=-this.r*f*(d(this.phi0)*k(j)-k(this.phi0)*d(j)*d(g-this.lam0)),l=this.r+m,n=this.r+o;return[l,n]},a.prototype._visible=function(a,b){return!0};return a}(),bA.equi=p,a=function(){function b(a){var c;c=this,a.lat0=0,b.__super__.constructor.call(this,a),c.lam0=0}var a;bU(b,V),b.title="Aitoff Projection",b.parameters=["lon0"],a=.6366197723675814,b.prototype.project=function(b,c){var d,e,f,g,h,i,j,k;g=this,k=g.ll(b,c),b=k[0],c=k[1],b=g.clon(b),f=g.rad(b),h=g.rad(c),d=.5*f,e=Math.acos(Math.cos(h)*Math.cos(d)),e!==0?(j=1/Math.sin(e),i=2*e*Math.cos(h)*Math.sin(d)*j,j*=e*Math.sin(h)):i=j=0,g.winkel&&(i=(i+f*a)*.5,j=(j+h)*.5);return[i*1e3,j*-1e3]},b.prototype._visible=function(a,b){return!0};return b}(),bA.aitoff=a,bm=function(){function b(a){b.__super__.constructor.call(this,a),this.winkel=!0}bU(b,a),b.title="Winkel Tripel Projection";return b}(),bA.winkel3=bm,l=function(){function a(b){var c,d,e;c=this,a.__super__.constructor.call(this,b),c.lat1=(d=b.lat1)!=null?d:30,c.phi1=c.rad(c.lat1),c.lat2=(e=b.lat2)!=null?e:50,c.phi2=c.rad(c.lat2)}bU(a,T),a.title="Conic Projection",a.parameters=["lon0","lat0","lat1","lat2"],a.prototype._visible=function(a,b){var c;c=this;return b>c.minLat&&b180&&(a-=360);return a};return a}(),C=function(){function a(b){var c,d,e,f,g,h,i,j,k,l,m,n,o;k=this,a.__super__.constructor.call(this,b),g=Math,o=[g.sin,g.cos,g.abs,g.log,g.tan,g.pow],l=o[0],e=o[1],c=o[2],bq=o[3],n=o[4],i=o[5],k.n=h=m=l(k.phi1),f=e(k.phi1),j=c(k.phi1-k.phi2)>=1e-10,j&&(h=bq(f/e(k.phi2))/bq(n(k.QUARTERPI+.5*k.phi2)/n(k.QUARTERPI+.5*k.phi1))),k.c=d=f*i(n(k.QUARTERPI+.5*k.phi1),h)/h,c(c(k.phi0)-k.HALFPI)<1e-10?k.rho0=0:k.rho0=d*i(n(k.QUARTERPI+.5*k.phi0),-h),k.minLat=-60,k.maxLat=85}bU(a,l),a.title="Lambert Conformal Conic Projection",a.prototype.project=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;l=this,i=l.rad(b),e=l.rad(l.clon(a)),g=Math,q=[g.sin,g.cos,g.abs,g.log,g.tan,g.pow],m=q[0],d=q[1],c=q[2],bq=q[3],n=q[4],j=q[5],h=l.n,c(c(i)-l.HALFPI)<1e-10?k=0:k=l.c*j(n(l.QUARTERPI+.5*i),-h),f=e*h,o=1e3*k*m(f),p=1e3*(l.rho0-k*d(f));return[o,p*-1]};return a}(),bA.lcc=C,U=function(){function a(){a.__super__.constructor.apply(this,arguments)}bU(a,l);return a}(),bj=function(){function a(a,b,c,d,e,f){var g;g=this,g.bbox=a,g.width=b,g.padding=d!=null?d:0,g.halign=e!=null?e:"center",g.valign=f!=null?f:"center",g.height=c,g.scale=Math.min((b-d*2)/a.width,(c-d*2)/a.height)}a.prototype.project=function(a,b){var c,d,e,f,g,h,i;b==null&&(b=a[1],a=a[0]),e=this,f=e.scale,c=e.bbox,d=e.height,g=e.width,h=e.halign==="center"?(g-c.width*f)*.5:e.halign==="left"?e.padding*f:g-(c.width-e.padding)*f,i=e.valign==="center"?(d-c.height*f)*.5:e.valign==="top"?e.padding*f:0,a=(a-c.left)*f+h,b=(b-c.top)*f+i;return[a,b]},a.prototype.projectPath=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;e=this;if(a.type==="path"){d=[],b=[99999,99999,-99999,-99999],o=a.contours;for(k=0,m=o.length;k0?(bB(a.duration)==="function"?i=a.duration(q):i=a.duration,a.delay!=null?bB(a.delay)==="function"?h=a.delay(q):h=a.delay:h=0,n.svgPath.attrs.fill==="none"&&(m=d(null,n.data),n.svgPath.attr("fill",m)),b=Raphael.animation({fill:c},i),n.svgPath.animate(b.delay(h))):n.svgPath.attr("fill",c)}}},bp.Kartograph.prototype.dotgrid=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V;r=this,q=(J=a.layer)!=null?J:r.layerIds[r.layerIds.length-1];if(!r.layers.hasOwnProperty(q))by('dotgrid error: layer "'+q+'" not found');else{p=r.layers[q],c=a.data,d=a.value,e=a.key,t={};if(e!=null&&bB(c)==="array")for(B=0,F=c.length;B0){if(h.grid.length===0)for(z=0,O=r.viewport.width;0<=O?z<=O:z>=O;z+=n)for(A=0,P=r.viewport.height;0<=P?A<=P:A>=P;A+=n){m={x:z+(Math.random()-.5)*n*.2,y:A+(Math.random()-.5)*n*.2,pathid:!1},l=!1,Q=p.pathsById;for(o in Q){u=Q[o];for(D=0,H=u.length;D0&&Raphael.svg?(b=Raphael.animation({r:x*.5},k),m.shape.animate(b.delay(g))):m.shape.attr({r:x*.5}),bB(i)==="function"?j=i(v):j=i,m.shape.attr(j))}}},bo=(bI=bp.filter)!=null?bI:bp.filter={},bo.__knownFilter={},bo.__patternFills=0,J.prototype.SVG=function(a,b){var c,d;typeof a=="string"&&(a=window.document.createElementNS("http://www.w3.org/2000/svg",a));if(b)for(c in b)d=b[c],a.setAttribute(c,d);return a},bp.Kartograph.prototype.addFilter=function(a,b,c){var d,e,f;c==null&&(c={}),f=this,d=window.document;if(bp.filter[b]!=null)e=(new bp.filter[b](c)).getFilter(a);else throw"unknown filter type "+b;return f.paper.defs.appendChild(e)},J.prototype.applyFilter=function(a){var b;b=this;return $("."+b.id,b.paper.canvas).attr({filter:"url(#"+a+")"})},J.prototype.applyTexture=function(a,b,c,d){var e,f,g,h,i,j;d==null&&(d="#fff"),f=this,bo.__patternFills+=1,i=f.paths,j=[];for(g=0,h=i.length;g0&&(m=g("feMorphology",{"in":"mask",radius:c,operator:"dilate",result:"mask"}),a.appendChild(m)),j=g("feColorMatrix",{"in":"mask",type:"matrix",values:"0 0 0 0 "+d[0]/255+" 0 0 0 0 "+d[1]/255+" 0 0 0 0 "+d[2]/255+" 0 0 0 1 0",result:"r0"}),a.appendChild(j),h=g("feGaussianBlur",{"in":"r0",stdDeviation:b,result:"r1"}),a.appendChild(h),i=g("feComposite",{operator:"out","in":"r1",in2:"mask",result:"comp"}),a.appendChild(i),l=g("feMerge"),f||l.appendChild(g("feMergeNode",{"in":"SourceGraphic"})),l.appendChild(g("feMergeNode",{"in":"r1"}));return a.appendChild(l)},a.prototype.innerGlow=function(a,b,c,d,e,f){var g,h,i,j,k,l,m;k=this,g=k.SVG,bq("innerglow"),j=g("feColorMatrix",{"in":"SourceGraphic",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 500 0",result:"mask"}),a.appendChild(j),m=g("feMorphology",{"in":"mask",radius:c,operator:"erode",result:"r1"}),a.appendChild(m),h=g("feGaussianBlur",{"in":"r1",stdDeviation:b,result:"r2"}),a.appendChild(h),j=g("feColorMatrix",{type:"matrix","in":"r2",values:"1 0 0 0 "+d[0]/255+" 0 1 0 0 "+d[1]/255+" 0 0 1 0 "+d[2]/255+" 0 0 0 -1 1",result:"r3"}),a.appendChild(j),i=g("feComposite",{operator:"in","in":"r3",in2:"mask",result:"comp"}),a.appendChild(i),l=g("feMerge"),f||l.appendChild(g("feMergeNode",{"in":"SourceGraphic"})),l.appendChild(g("feMergeNode",{"in":"comp"}));return a.appendChild(l)};return a}(),bo.glow=u,bw=typeof exports!="undefined"&&exports!==null?exports:this,bp=bw.$K=(bJ=bw.kartograph)!=null?bJ:bw.kartograph={},bp.Kartograph.prototype.addGeoPath=function(a,b,c){var d,e,f;b==null&&(b=[]),c==null&&(c=""),d=this,f=d.getGeoPathStr(a,b),e=d.paper.path(f),c!==""&&e.node.setAttribute("class",c);return e},bp.Kartograph.prototype.getGeoPathStr=function(a,b){var c,d,e,f,g,h,i;b==null&&(b=[]),e=this,type(b)==="string"&&(b=b.split("")),b.length===0&&b.push("M"),f="";for(d in a){g=a[d],c=(i=b[d])!=null?i:"L",h=e.lonlat2xy(g);if(isNaN(h[0])||isNaN(h[1]))continue;f+=c+h[0]+","+h[1]}return f},Q=function(){function a(a){this.zoomOut=bS(this.zoomOut,this),this.zoomIn=bS(this.zoomIn,this);var b,c,d,e,f,g,h,i;e=this,e.map=a,b=a.container,c=function(a,b){var c,d,e,f;b==null&&(b=[]),d=$('
');for(e=0,f=b.length;ef&&ah+f||g+ej+f||i+e(e+f)*(e+f)?!1:!0},a.prototype.render=function(a){var b;b=this,b.path=b.layers.mapcanvas.circle(b.x,b.y,b.radius),b.update(),b.map.applyStyles(b.path);return b},a.prototype.update=function(){var a,b;a=this,a.path.attr({x:a.x,y:a.y,r:a.radius}),b=a.path,b.node.setAttribute("style",a.style),b.node.setAttribute("class",a["class"]),a.title!=null&&b.attr("title",a.title);return a},a.prototype.clear=function(){var a;a=this,a.path.remove();return a},a.prototype.nodes=function(){var a;a=this;return[a.path.node]};return a}(),g.props=["radius","style","class","title"],g.layers=[],bp.Bubble=g,z=function(){function a(b){var c,d,e,f,g,h;c=this,a.__super__.constructor.call(this,b),c.icon=(d=b.icon)!=null?d:"",c.offset=(e=b.offset)!=null?e:[0,0],c.iconsize=(f=b.iconsize)!=null?f:[10,10],c["class"]=(g=b["class"])!=null?g:"",c.title=(h=b.title)!=null?h:""}bU(a,bp.Symbol),a.prototype.render=function(a){var b,c;c=this,b=c.map.container,c.img=$(""),c.img.attr({src:c.icon,title:c.title,alt:c.title,width:c.iconsize[0],height:c.iconsize[1]}),c.img.addClass(c["class"]),c.img.css({position:"absolute","z-index":1e3,cursor:"pointer"}),c.img[0].symbol=c,b.append(c.img);return c.update()},a.prototype.update=function(){var a;a=this;return a.img.css({left:a.x+a.offset[0]+"px",top:a.y+a.offset[1]+"px"})},a.prototype.clear=function(){var a;a=this,a.img.remove();return a},a.prototype.nodes=function(){var a;a=this;return[a.img]};return a}(),z.props=["icon","offset","class","title","iconsize"],z.layers=[],bp.Icon=z,bg=function(){function a(b){var c,d,e,f,g;c=this,a.__super__.constructor.call(this,b),c.text=(d=b.text)!=null?d:"",c.style=(e=b.style)!=null?e:"",c["class"]=(f=b["class"])!=null?f:"",c.offset=(g=b.offset)!=null?g:[0,0]}bU(a,bp.Symbol),a.prototype.render=function(a){var b,c;c=this,c.lbl=b=c.layers.mapcanvas.text(c.x,c.y,c.text),c.update();return c},a.prototype.update=function(){var a;a=this,a.lbl.attr({x:a.x+a.offset[0],y:a.y+a.offset[1]}),a.lbl.node.setAttribute("style",a.style);return a.lbl.node.setAttribute("class",a["class"])},a.prototype.clear=function(){var a;a=this,a.lbl.remove();return a},a.prototype.nodes=function(){var a;a=this;return[a.lbl.node]};return a}(),bg.props=["text","style","class","offset"],bg.layers=[],bp.Label=bg,y=function(){function a(b){var c,d,e,f;c=this,a.__super__.constructor.call(this,b),c.text=(d=b.text)!=null?d:"",c.style=(e=b.style)!=null?e:"",c["class"]=(f=b["class"])!=null?f:""}bU(a,bp.Symbol),a.prototype.render=function(a){var b,c,d;d=this,b=$("
"+d.text+"
"),b.css({width:"50px",position:"absolute",left:"-25px","text-align":"center"}),d.lbl=c=$('
'),c.append(b),d.layers.lbl.append(c),b.css({height:b.height()+"px",top:b.height()*-0.4+"px"}),d.update();return d},a.prototype.update=function(){var a;a=this;return a.lbl.css({position:"absolute",left:a.x+"px",top:a.y+"px"})},a.prototype.clear=function(){var a;a=this,a.lbl.remove();return a},a.prototype.nodes=function(){var a;a=this;return[a.lbl[0]]};return a}(),y.props=["text","style","class"],y.layers=[{id:"lbl",type:"html"}],bp.HtmlLabel=y,S=function(){function b(c){var d,e,f,g,h,i,j,k,l,m;a=this,b.__super__.constructor.call(this,c),a.radius=(e=c.radius)!=null?e:4,a.styles=(f=c.styles)!=null?f:"",a.colors=(g=c.colors)!=null?g:["#3cc","#c3c","#33c","#cc3"],a.titles=(h=c.titles)!=null?h:["","","","",""],a.values=(i=c.values)!=null?i:[],a.border=(j=c.border)!=null?j:!1,a.borderWidth=(k=c.borderWidth)!=null?k:2,a["class"]=(l=c["class"])!=null?l:"piechart",(m=(d=Raphael.fn).pieChart)==null&&(d.pieChart=bn)}var a;bU(b,bh),a=null,b.prototype.overlaps=function(b){var c,d,e,f,g,h,i,j,k,l;k=[a.x,a.y,a.radius],g=k[0],i=k[1],e=k[2],l=[b.x,b.y,b.radius],h=l[0],j=l[1],f=l[2];if(g-e>h+f||g+ej+f||i+e(e+f)*(e+f)?!1:!0},b.prototype.render=function(b){var c;a=this,a.border!=null&&(c=a.layers.mapcanvas.circle(a.x,a.y,a.radius+a.borderWidth).attr({stroke:"none",fill:a.border})),a.chart=a.layers.mapcanvas.pieChart(a.x,a.y,a.radius,a.values,a.titles,a.colors,"none"),a.chart.push(c);return a},b.prototype.update=function(b){var c;return},b.prototype.clear=function(){var b,c,d,e;a=this,e=a.chart;for(c=0,d=e.length;c180),0,h,j,"z"]).attr(f)},h=-270,o=0,l=function(e){var j,k,l,m,p,q,r;r=d[e],j=360*r/o,q=h+j*.5,k=f[e],m=500,l=30,p=n(a,b,c,h,h+j,{fill:k,stroke:g,"stroke-width":1}),p.mouseover(function(){p.stop().animate({transform:"s1.1 1.1 "+a+" "+b},m,"elastic")}),p.mouseout(function(){p.stop().animate({transform:""},m,"elastic")}),h+=j,i.push(p)};for(q=0,r=d.length;qh+f||g+ej+f||i+e(e+f)*(e+f)?!1:!0},a.prototype.render=function(a){var b,c,d,e,f,g;d=this,e=d.width,c=d.height,f=d.x,g=d.y,b=d.layers.mapcanvas.rect(f-e*.5-2,g-c*.5-2,e+4,c+4).attr({stroke:"none",fill:"#fff"}),d.chart=d.layers.mapcanvas.drawStackedBarChart(d.x,d.y,d.width,d.height,d.values,d.titles,d.colors,"none"),d.chart.push(b);return d},a.prototype.update=function(){var a,b;a=this;return},a.prototype.clear=function(){var a,b,c,d,e;a=this,e=a.chart;for(c=0,d=e.length;c>>0;if(c===0)return-1;var d=0;arguments.length>0&&(d=Number(arguments[1]),d!=d?d=0:d!=0&&d!=Infinity&&d!=-Infinity&&(d=(d>0||-1)*Math.floor(Math.abs(d))));if(d>=c)return-1;var e=d>=0?d:Math.max(c-Math.abs(d),0);for(;es.left&&a.tops.top},a.prototype.inside=function(a,b){var c;c=this;return a>=c.left&&a<=c.right&&b>=c.top&&b<=c.bottom},a.prototype.join=function(a){var b;b=this,b.update(a.left,a.top),b.update(a.right,a.bottom);return this};return a}(),c.fromXML=function(a){var b,c,d,e;d=Number(a.getAttribute("x")),e=Number(a.getAttribute("y")),c=Number(a.getAttribute("w")),b=Number(a.getAttribute("h"));return new bp.BBox(d,e,c,b)},bp.BBox=c,(bL=bp.geom)==null&&(bp.geom={}),(bM=(bE=bp.geom).clipping)==null&&(bE.clipping={}),k=function(){function f(){}var a,b,c,d,e;b=0,c=1,d=2,a=4,e=8,f.prototype.compute_out_code=function(a,b,c){var d,e;e=this,d=e.INSIDE,ba.right&&(d|=e.RIGHT),ca.bottom&&(d|=e.BOTTOM);return d},f.prototype.clip=function(a,b,c,d,e){var f,g,h,i,j,k,l;j=this,g=j.compute_out_code(a,b,c),h=j.compute_out_code(a,d,e),f=False;while(True){if(!(g|h)){f=True;break}if(g&h)break;i=code===0?h:g,i&j.TOP?(k=b+(d-b)*(a.top-c)/(e-c),l=a.top):i&j.BOTTOM?(k=b+(d-b)*(a.bottom-c)/(e-c),l=a.bottom):i&j.RIGHT?(l=c+(e-c)*(a.right-b)/(d-b),k=a.right):i&j.LEFT&&(l=c+(e-c)*(a.left-b)/(d-b),k=a.left),i===g?(b=k,c=l,g=j.compute_out_code(a,b,c)):(d=k,e=l,h=j.compute_out_code(a,d,e))}return f?[b,c,d,e]:null};return f}(),bp.geom.clipping.CohenSutherland=k,A=function(){function a(a,b,d){var e,f;f=this,f.container=e=$(a),b==null&&(b=e.width()),d==null&&(d=e.height()),d===0&&(d=b*.5),f.viewport=new c(0,0,b,d),f.paper=f.createSVGLayer(),f.markers=[],f.pathById={},f.container.addClass("kartograph")}a.prototype.createSVGLayer=function(a){var b,c,d,e,f,g,h,i;e=this,(i=e._layerCnt)==null&&(e._layerCnt=0),d=e._layerCnt++,h=e.viewport,c=e.container,f=Raphael(c[0],h.width,h.height),g=$(f.canvas),g.css({position:"absolute",top:"0px",left:"0px","z-index":d+5}),c.css("position")==="static"&&c.css({position:"relative",height:h.height+"px"}),g.addClass(a),b=$("desc",f.canvas).text(),$("desc",f.canvas).text(b.replace("with ","with kartograph "+bp.version+" and "));return f},a.prototype.createHTMLLayer=function(a){var b,c,d,e,f,g;e=this,f=e.viewport,b=e.container,(g=e._layerCnt)==null&&(e._layerCnt=0),d=e._layerCnt++,c=$('
'),c.css({position:"absolute",top:"0px",left:"0px",width:f.width+"px",height:f.height+"px","z-index":d+5}),b.append(c);return c},a.prototype.loadMap=function(a,b,c){var d,e,f;d=this,d.clear(),d.opts=c!=null?c:{},(f=(e=d.opts).zoom)==null&&(e.zoom=1),d.mapLoadCallback=b,d._lastMapUrl=a,d.cacheMaps&&bp.__mapCache[a]!=null?d._mapLoaded(bp.__mapCache[a]):$.ajax({url:a,dataType:"text",success:d._mapLoaded,context:d,error:function(a,b,c){return by(a,b,c)}})},a.prototype._mapLoaded=function(a){var b,c,d,e,f,g,h,i,j,k,l;e=this,e.cacheMaps&&((i=bp.__mapCache)==null&&(bp.__mapCache={}),bp.__mapCache[e._lastMapUrl]=a);try{a=$(a)}catch(m){by("something went horribly wrong while parsing svg");return}e.svgSrc=a,h=e.viewport,b=$("view",a)[0],e.viewAB=c=bp.View.fromXML(b),f=(j=e.opts.padding)!=null?j:0,d=(k=e.opts.halign)!=null?k:"center",g=(l=e.opts.valign)!=null?l:"center",e.viewBC=new bp.View(c.asBBox(),h.width,h.height,f,d,g),e.proj=bp.Proj.fromXML($("proj",b)[0]);return e.mapLoadCallback(e)},a.prototype.addLayer=function(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;h=this,(q=h.layerIds)==null&&(h.layerIds=[]),(r=h.layers)==null&&(h.layers={}),bB(a)==="object"?(i=a,a=i.id,b=i.className,c=i.key,l=i.title):i={},b==null&&(b=a),j=$("#"+a,h.svgSrc);if(j.length!==0){g=new J(b,c,h,i.filter),d=$("*",j[0]);for(m=0,o=d.length;m0&&(h.layers[b]=g,h.layerIds.push(b)),e=["click"];for(n=0,p=e.length;n');return b()},a.prototype.applyStyles=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;e=this;if(e.styles==null)return a;(n=e._pathTypes)==null&&(e._pathTypes=["path","circle","rectangle","ellipse"]),(o=e._regardStyles)==null&&(e._regardStyles=["fill","stroke","fill-opacity","stroke-width","stroke-opacity"]);for(h in e.styles){f=h,p=f.split(",");for(j=0,l=p.length;j1)continue;f=f[0].split("."),c=f.slice(1);if(c.length>0&&c.indexOf(b)<0)continue;f=f[0];if(e._pathTypes.indexOf(f)>=0&&f!==a.type)continue;g=e.styles[h],q=e._regardStyles;for(k=0,m=q.length;k=p;0<=p?g++:g--)e=a.attributes[g],e.name.substr(0,5)==="data-"&&(m=e.value,o=Number(m),m.trim()!==""&&o===m&&!isNaN(o)&&(m=o),f[e.name.substr(5)]=m);h.data=f,bB(d)==="string"?k=d:bB(d)==="function"&&(k=d(f)),k!=null&&h.svgPath.attr("title",k)}a.prototype.setView=function(a){var b,c,d;b=this,c=a.projectPath(b.path),b.vpath=c;if(b.path.type==="path"){d=c.svgString();return b.svgPath.attr({path:d})}if(b.path.type==="circle")return b.svgPath.attr({cx:c.x,cy:c.y,r:c.r})},a.prototype.remove=function(){var a;a=this;return a.svgPath.remove()};return a}(),bw=typeof exports!="undefined"&&exports!==null?exports:this,bp=(bO=bw.kartograph)!=null?bO:bw.kartograph={},bp.parsecss=function(a,b){var c,d,e,f,g,h,i,j;f={},a=bs(a),j=a.split("`b%");for(h=0,i=j.length;h=g;0<=g?c++:c--)a+=b[c][0]*b[c+1][1]-b[c+1][0]*b[c][1];a*=.5,a=a,d.areas.push(a),d._area+=a}return d._area},a.prototype.centroid=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;m=this;if(m._centroid!=null)return m._centroid;b=m.area(),d=e=0;for(h=0,w=m.contours.length-1;0<=w?h<=w:h>=w;0<=w?h++:h--){c=m.contours[h],a=m.areas[h],r=s=0,k=c.length,t=[],p=0;for(i=0,u=k-1;0<=u?i<=u:i>=u;0<=u?i++:i--)n=c[i],o=c[(i+1)%k],f=o[0]-n[0],g=o[1]-n[1],l=Math.sqrt(f*f+g*g),t.push(l),p+=l;for(i=0,v=k-1;0<=v?i<=v:i>=v;0<=v?i++:i--)n=c[i],o=c[(i+1)%k],q=t[i]/p,r+=q*n[0],s+=q*n[1];j=a/b,d+=r*j,e+=s*j}m._centroid=[d,e];return m._centroid},a.prototype.isInside=function(a,b){var c,d,e,f,g;f=this,c=f._bbox;if(ac[2]||bc[3])return!1;for(e=0,g=f.contours.length-1;0<=g?e<=g:e>=g;0<=g?e++:e--){d=f.contours[e];if(bz(d,[a,b]))return!0}return!1};return a}(),bp.geom.Path=R,j=function(){function a(b,c,d){this.x=b,this.y=c,this.r=d,a.__super__.constructor.call(this,"circle",null,!0)}bU(a,R),a.prototype.toSVG=function(a){var b;b=this;return a.circle(b.x,b.y,b.r)},a.prototype.centroid=function(){var a;a=this;return[a.x,a.y]},a.prototype.area=function(){var a;a=this;return Math.PI*a.r*m.r};return a}(),bp.geom.Circle=j,R.fromSVG=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;e=[],m=a.nodeName,k=null;if(m==="path"){i=a.getAttribute("d").trim(),h=Raphael.parsePathString(i),b=h[h.length-1]==="Z",l=b?"Z M":"M",d=[];for(n=0,o=h.length;n2&&(e.push(d),d=[]),d.push([c[1],c[2]])):c[0]==="L"?d.push([c[1],c[2]]):c[0]==="Z"&&d.length>2&&(e.push(d),d=[])}d.length>2&&(e.push(d),d=[]),k=new bp.geom.Path(m,e,b)}else m==="circle"&&(f=a.getAttribute("cx"),g=a.getAttribute("cy"),j=a.getAttribute("r"),k=new bp.geom.Circle(f,g,j));return k},E=function(){function a(a){this.points=a}a.prototype.clipToBBox=function(b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;l=this,c=(new bp.geom.clipping.CohenSutherland).clip,k=[],f=[],e=!1;for(d=0,t=l.points.length-2;0<=t?d<=t:d>=t;0<=t?d++:d--){q=l.points[d],g=q[0],h=q[1],r=l.points[d+1],i=r[0],j=r[1];try{s=c(b,g,h,i,j),m=s[0],o=s[1],n=s[2],p=s[3],e=!0,k.push([m,o]),(i!==n||j!==o||d===len(l.points)-2)&&k.push([n,p])}catch(u){e&&k.length>1&&(f.push(new a(k)),k=[]),e=!1}}k.length>1&&f.push(new a(k));return f},a.prototype.toSVG=function(){var a,b,c,d,e,f,g,h;b=this,a=[],h=b.points;for(e=0,f=h.length;e=p;0<=p?f++:f--){l=a[f][0]-b[0],n=a[f][1]-b[1],m=a[(f+1)%g][0]-b[0],o=a[(f+1)%g][1]-b[1],i=d(n,l),j=d(o,m),e=j-i;while(e>h)e-=k;while(e<-h)e+=k;c+=e}return Math.abs(c)>=h},bw=typeof exports!="undefined"&&exports!==null?exports:this,bp=(bR=bw.kartograph)!=null?bR:bw.kartograph={},bA=bp.proj={},Function.prototype.bind=function(a){var b;b=this;return function(){return b.apply(a,arguments)}},T=function(){function a(a){var b,c,d;b=this,b.lon0=(c=a.lon0)!=null?c:0,b.lat0=(d=a.lat0)!=null?d:0,b.PI=Math.PI,b.HALFPI=b.PI*.5,b.QUARTERPI=b.PI*.25,b.RAD=b.PI/180,b.DEG=180/b.PI,b.lam0=b.rad(this.lon0),b.phi0=b.rad(this.lat0),b.minLat=-90,b.maxLat=90}a.parameters=[],a.title="Projection",a.prototype.rad=function(a){return a*this.RAD},a.prototype.deg=function(a){return a*this.DEG},a.prototype.plot=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;b==null&&(b=!0),f=[],c=!0;for(j=0,k=a.length;j=h;g<=h?b++:b--)d.push(e(180,b));for(c=180;c>=-180;c--)d.push(e(c,f.minLat));for(b=i=f.minLat,j=f.maxLat;i<=j?b<=j:b>=j;i<=j?b++:b--)d.push(e(-180,b));f.lon0=a;return d},a.prototype.world_bbox=function(){var a,b,c,d,e,f;b=this.project.bind(this),d=this.sea(),a=new bp.BBox;for(e=0,f=d.length;e=g;0<=g?c++:c--)b=a.attributes[c],b.name!=="id"&&(e[b.name]=b.value);f=new bp.proj[d](e),f.name=d;return f},bp.Proj=T,n=function(){function a(b){var c,d,e;b==null&&(b={}),c=this,c.flip=Number((d=b.flip)!=null?d:0),c.flip===1&&(b.lon0=(e=-b.lon0)!=null?e:0),a.__super__.constructor.call(this,b)}bU(a,T),a.parameters=["lon0","flip"],a.title="Cylindrical Projection",a.prototype._visible=function(a,b){return!0},a.prototype.clon=function(a){a-=this.lon0,a<-180?a+=360:a>180&&(a-=360);return a},a.prototype.ll=function(a,b){return this.flip===1?[-a,-b]:[a,b]};return a}(),q=function(){function a(){a.__super__.constructor.apply(this,arguments)}bU(a,n),a.title="Equirectangular Projection",a.prototype.project=function(a,b){var c;c=this.ll(a,b),a=c[0],b=c[1],a=this.clon(a);return[a*Math.cos(this.phi0)*1e3,b*-1*1e3]};return a}(),bA.lonlat=q,h=function(){function a(b){var c;a.__super__.constructor.call(this,b),this.lat1=(c=b.lat1)!=null?c:0,this.phi1=this.rad(this.lat1)}bU(a,n),a.parameters=["lon0","lat1","flip"],a.title="Cylindrical Equal Area",a.prototype.project=function(a,b){var c,d,e,f,g;g=this.ll(a,b),a=g[0],b=g[1],c=this.rad(this.clon(a)),d=this.rad(b*-1),e=c*Math.cos(this.phi1),f=Math.sin(d)/Math.cos(this.phi1);return[e*1e3,f*1e3]};return a}(),bA.cea=h,t=function(){function a(b){b.lat1=45,a.__super__.constructor.call(this,b)}bU(a,h),a.title="Gall-Peters Projection",a.parameters=["lon0","flip"];return a}(),bA.gallpeters=t,x=function(){function a(b){b.lat1=37.7,a.__super__.constructor.call(this,b)}bU(a,h),a.title="Hobo-Dyer Projection",a.parameters=["lon0","flip"];return a}(),bA.hobodyer=x,e=function(){function a(b){b.lat1=30,a.__super__.constructor.call(this,b)}bU(a,h),a.title="Behrmann Projection",a.parameters=["lon0","flip"];return a}(),bA.behrmann=e,d=function(){function a(b){b.lat1=50,a.__super__.constructor.call(this,b)}bU(a,h),a.title="Balthasart Projection",a.parameters=["lon0","flip"];return a}(),bA.balthasart=d,L=function(){function a(b){a.__super__.constructor.call(this,b),this.minLat=-85,this.maxLat=85}bU(a,n),a.title="Mercator Projection",a.prototype.project=function(a,b){var c,d,e,f,g,h,i;f=this,i=f.ll(a,b),a=i[0],b=i[1],d=Math,c=f.rad(f.clon(a)),e=f.rad(b*-1),g=c*1e3,h=d.log((1+d.sin(e))/d.cos(e))*1e3;return[g,h]};return a}(),bA.mercator=L,V=function(){function a(){a.__super__.constructor.apply(this,arguments)}bU(a,n),a.title="Pseudo-Cylindrical Projection";return a}(),N=function(){function a(b){var c;a.__super__.constructor.call(this,b),c=this,c.A0=.8707,c.A1=-0.131979,c.A2=-0.013791,c.A3=.003971,c.A4=-0.001529,c.B0=1.007226,c.B1=.015085,c.B2=-0.044475,c.B3=.028874,c.B4=-0.005916,c.C0=c.B0,c.C1=3*c.B1,c.C2=7*c.B2,c.C3=9*c.B3,c.C4=11*c.B4,c.EPS=1e-11,c.MAX_Y=.8707*.52*Math.PI;return}bU(a,V),a.title="Natural Earth Projection",a.prototype.project=function(a,b){var c,d,e,f,g,h,i,j;g=this,j=g.ll(a,b),a=j[0],b=j[1],c=g.rad(g.clon(a)),d=g.rad(b*-1),e=d*d,f=e*e,h=c*(g.A0+e*(g.A1+e*(g.A2+f*e*(g.A3+e*g.A4))))*180+500,i=d*(g.B0+e*(g.B1+f*(g.B2+g.B3*e+g.B4*f)))*180+270;return[h,i]};return a}(),bA.naturalearth=N,ba=function(){function a(b){var c;a.__super__.constructor.call(this,b),c=this,c.X=[1,-5.67239e-12,-0.0000715511,311028e-11,.9986,-0.000482241,-0.000024897,-0.00000133094,.9954,-0.000831031,-0.000044861,-9.86588e-7,.99,-0.00135363,-0.0000596598,367749e-11,.9822,-0.00167442,-0.0000044975,-0.00000572394,.973,-0.00214869,-0.0000903565,1.88767e-8,.96,-0.00305084,-0.0000900732,164869e-11,.9427,-0.00382792,-0.0000653428,-0.00000261493,.9216,-0.00467747,-0.000104566,48122e-10,.8962,-0.00536222,-0.0000323834,-0.00000543445,.8679,-0.00609364,-0.0001139,332521e-11,.835,-0.00698325,-0.0000640219,9.34582e-7,.7986,-0.00755337,-0.0000500038,9.35532e-7,.7597,-0.00798325,-0.0000359716,-0.00000227604,.7186,-0.00851366,-0.000070112,-0.00000863072,.6732,-0.00986209,-0.000199572,191978e-10,.6213,-0.010418,883948e-10,624031e-11,.5722,-0.00906601,181999e-9,624033e-11,.5322,0,0,0],c.Y=[0,.0124,3.72529e-10,1.15484e-9,.062,.0124001,1.76951e-8,-5.92321e-9,.124,.0123998,-7.09668e-8,2.25753e-8,.186,.0124008,2.66917e-7,-8.44523e-8,.248,.0123971,-9.99682e-7,3.15569e-7,.31,.0124108,373349e-11,-0.0000011779,.372,.0123598,-0.000013935,439588e-11,.434,.0125501,520034e-10,-0.0000100051,.4968,.0123198,-0.0000980735,922397e-11,.5571,.0120308,402857e-10,-0.0000052901,.6176,.0120369,-0.0000390662,7.36117e-7,.6769,.0117015,-0.0000280246,-8.54283e-7,.7346,.0113572,-0.0000408389,-5.18524e-7,.7903,.0109099,-0.0000486169,-0.0000010718,.8435,.0103433,-0.0000646934,5.36384e-9,.8936,.00969679,-0.0000646129,-0.00000854894,.9394,.00840949,-0.000192847,-0.00000421023,.9761,.00616525,-0.000256001,-0.00000421021,1,0,0,0],c.NODES=18,c.FXC=.8487,c.FYC=1.3523,c.C1=11.459155902616464,c.RC1=.08726646259971647,c.ONEEPS=1.000001,c.EPS=1e-8;return}bU(a,V),a.title="Robinson Projection",a.prototype._poly=function(a,b,c){return a[b]+c*(a[b+1]+c*(a[b+2]+c*a[b+3]))},a.prototype.project=function(a,b){var c,d,e,f,g,h,i,j;g=this,j=g.ll(a,b),a=j[0],b=j[1],a=g.clon(a),d=g.rad(a),e=g.rad(b*-1),f=Math.abs(e),c=Math.floor(f*g.C1),c>=g.NODES&&(c=g.NODES-1),f=g.deg(f-g.RC1*c),c*=4,h=g._poly(g.X,c,f)*g.FXC*d,i=g._poly(g.Y,c,f)*g.FYC,e<0&&(i=-i);return[h,i]};return a}(),bA.robinson=ba,o=function(){function a(b){var c;a.__super__.constructor.call(this,b),c=this,c.C_x=.4222382003157712,c.C_y=1.3265004281770023,c.RC_y=.7538633073600218,c.C_p=3.5707963267948966,c.RC_p=.2800495767557787,c.EPS=1e-7,c.NITER=6}bU(a,V),a.title="Eckert IV Projection",a.prototype.project=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;h=this,m=h.ll(a,b),a=m[0],b=m[1],f=h.rad(h.clon(a)),g=h.rad(b*-1),i=h.C_p*Math.sin(g),c=g*g,g*=.895168+c*(.0218849+c*.00826809),e=h.NITER;while(e>0){d=Math.cos(g),j=Math.sin(g),c=(g+j*(d+2)-i)/(1+d*(d+2)-j*j),g-=c;if(Math.abs(c)=0?h.HALFPI:-h.HALFPI:i*=.5,k=1e3*h.cx*f*g.cos(i),l=1e3*h.cy*g.sin(i);return[k,l*-1]};return a}(),bA.mollweide=M,bk=function(){function a(b){a.__super__.constructor.call(this,b,1.0471975511965976)}bU(a,M),a.title="Wagner IV Projection";return a}(),bA.wagner4=bk,bl=function(){function a(b){a.__super__.constructor.call(this,b,null,.90977,1.65014,3.00896)}bU(a,M),a.title="Wagner V Projection";return a}(),bA.wagner5=bl,I=function(){function c(){c.__super__.constructor.apply(this,arguments)}var a,b;bU(c,V),b=-89,a=89,c.parameters=["lon0","lat0","flip"],c.title="Loximuthal Projection (equidistant)",c.prototype.project=function(a,b){var c,d,e,f,g,h,i;e=this,i=e.ll(a,b),a=i[0],b=i[1],d=Math,c=e.rad(e.clon(a)),f=e.rad(b),f===e.phi0?g=c*d.cos(e.phi0):g=c*(f-e.phi0)/(d.log(d.tan(e.QUARTERPI+f*.5))-d.log(d.tan(e.QUARTERPI+e.phi0*.5))),g*=1e3,h=1e3*(f-e.phi0);return[g,h*-1]};return c}(),bA.loximuthal=I,i=function(){function f(){f.__super__.constructor.apply(this,arguments)}var a,b,c,d,e;bU(f,V),f.title="Canters Modified Sinusoidal I",f.parameters=["lon0"],a=1.1966,b=-0.129,c=3*b,d=-0.0076,e=5*d,f.prototype.project=function(f,g){var h,i,j,k,l,m;h=this,m=h.ll(f,g),f=m[0],g=m[1],f=h.rad(h.clon(f)),g=h.rad(g),k=g*g,l=k*k,i=1e3*f*Math.cos(g)/(a+c*k+e*l),j=1e3*g*(a+b*k+d*l);return[i,j*-1]};return f}(),bA.canters1=i,w=function(){function n(a){n.__super__.constructor.call(this,a)}var a,b,c,d,e,f,g,h,i,j,k,l,m;bU(n,V),n.title="Hatano Projection",g=20,c=1e-7,h=1.000001,a=2.67595,b=2.43763,i=.3736990601468637,j=.4102345310814193,e=1.75859,f=1.93052,l=.5686373742600607,m=.5179951515653813,d=.85,k=1.1764705882352942,n.prototype.project=function(h,i){var j,k,l,m,n,o,p,q,r;m=this,r=m.ll(h,i),h=r[0],i=r[1],l=m.rad(m.clon(h)),n=m.rad(i),j=Math.sin(n)*(n<0?b:a);for(k=g;k>=1;k+=-1){o=(n+Math.sin(n)-j)/(1+Math.cos(n)),n-=o;if(Math.abs(o)c.lat1?c.p1.project(a,b):c.p0.project(a,b)};return a}(),bA.goodehomolosine=v,O=function(){function b(a){b.__super__.constructor.call(this,a),this.r=this.HALFPI*100}var a;bU(b,V),b.title="Nicolosi Globular Projection",b.parameters=["lon0"],a=1e-10,b.prototype._visible=function(a,b){var c;c=this,a=c.clon(a);return a>-90&&a<90},b.prototype.project=function(b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p;h=this,p=h.ll(b,c),b=p[0],c=p[1],f=h.rad(h.clon(b)),j=h.rad(c),Math.abs(f)=0},a.prototype._truncate=function(a,b){var c,d,e,f,g;c=Math,d=this.r,e=c.atan2(b-d,a-d),f=d+d*c.cos(e),g=d+d*c.sin(e);return[f,g]},a.prototype.sea=function(){var a,b,c,d;b=[],d=this.r,a=Math;for(c=0;c<=360;c++)b.push([d+a.cos(this.rad(c))*d,d+a.sin(this.rad(c))*d]);return b},a.prototype.world_bbox=function(){var a;a=this.r;return new bp.BBox(0,0,a*2,a*2)};return a}(),P=function(){function a(){a.__super__.constructor.apply(this,arguments)}bU(a,b),a.title="Orthographic Projection",a.prototype.project=function(a,b){var c,d,e,f,g,h,i,j;f=this,e=Math,d=f.to_elevation(b),c=f.to_azimuth(a),h=f.r*e.cos(d)*e.sin(c-f.azimuth0),j=-f.r*(e.cos(f.elevation0)*e.sin(d)-e.sin(f.elevation0)*e.cos(d)*e.cos(c-f.azimuth0)),g=f.r+h,i=f.r+j;return[g,i]};return a}(),bA.ortho=P,B=function(){function a(b){a.__super__.constructor.call(this,b),this.scale=Math.sqrt(2)*.5}bU(a,b),a.title="Lambert Azimuthal Equal-Area Projection",a.prototype.project=function(a,b){var c,d,e,f,g,h,i,j,k,l;g=this.rad(b),e=this.rad(a),f=Math,h=f.sin,c=f.cos,d=f.pow(2/(1+h(this.phi0)*h(g)+c(this.phi0)*c(g)*c(e-this.lam0)),.5),d*=this.scale,j=this.r*d*c(g)*h(e-this.lam0),l=-this.r*d*(c(this.phi0)*h(g)-h(this.phi0)*c(g)*c(e-this.lam0)),i=this.r+j,k=this.r+l;return[i,k]};return a}(),bA.laea=B,bf=function(){function a(){a.__super__.constructor.apply(this,arguments)}bU(a,b),a.title="Stereographic Projection",a.prototype.project=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;h=this.rad(b),f=this.rad(a),g=Math,i=g.sin,c=g.cos,e=.5,d=2*e/(1+i(this.phi0)*i(h)+c +(this.phi0)*c(h)*c(f-this.lam0)),k=this.r*d*c(h)*i(f-this.lam0),m=-this.r*d*(c(this.phi0)*i(h)-i(this.phi0)*c(h)*c(f-this.lam0)),j=this.r+k,l=this.r+m;return[j,l]};return a}(),bA.stereo=bf,bb=function(){function a(b){var c,d,e,f,g,h,i,j;a.__super__.constructor.call(this,{lon0:0,lat0:0}),this.dist=(h=b.dist)!=null?h:3,this.up=this.rad((i=b.up)!=null?i:0),this.tilt=this.rad((j=b.tilt)!=null?j:0),this.scale=1,f=Number.MAX_VALUE,e=Number.MAX_VALUE*-1;for(c=0;c<=179;c++)for(d=0;d<=360;d++)g=this.project(d-180,c-90),f=Math.min(g[0],f),e=Math.max(g[0],e);this.scale=this.r*2/(e-f),a.__super__.constructor.call(this,b);return}bU(a,b),a.parameters=["lon0","lat0","tilt","dist","up"],a.title="Satellite Projection",a.prototype.project=function(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;c==null&&(c=0),m=this.rad(b),k=this.rad(a),l=Math,p=l.sin,f=l.cos,n=this.r,o=n*(c+6371)/3671,g=p(this.phi0)*p(m)+f(this.phi0)*f(m)*f(k-this.lam0),j=(this.dist-1)/(this.dist-g),j=(this.dist-1)/(this.dist-g),j*=this.scale,t=o*j*f(m)*p(k-this.lam0),w=-o*j*(f(this.phi0)*p(m)-p(this.phi0)*f(m)*f(k-this.lam0)),i=f(this.up),r=p(this.up),h=f(this.tilt),q=p(this.tilt),e=o*(this.dist-1),d=(w*i+t*r)*p(this.tilt/e)+h,u=(t*i-w*r)*f(this.tilt/d),x=(w*i+t*r)/d,s=n+u,v=n+x;return[s,v]},a.prototype._visible=function(a,b){var c,d,e,f;e=this.to_elevation(b),c=this.to_azimuth(a),f=Math,d=f.sin(e)*f.sin(this.elevation0)+f.cos(this.elevation0)*f.cos(e)*f.cos(c-this.azimuth0);return d>=1/this.dist},a.prototype.sea=function(){var a,b,c,d;b=[],d=this.r,a=Math;for(c=0;c<=360;c++)b.push([d+a.cos(this.rad(c))*d,d+a.sin(this.rad(c))*d]);return b};return a}(),bA.satellite=bb,p=function(){function a(){a.__super__.constructor.apply(this,arguments)}bU(a,b),a.title="Equidistant Azimuthal Projection",a.prototype.project=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;i=this,j=i.rad(b),g=i.rad(a),h=Math,k=h.sin,d=h.cos,e=k(this.phi0)*k(j)+d(this.phi0)*d(j)*d(g-this.lam0),c=h.acos(e),f=.325*c/k(c),m=this.r*f*d(j)*k(g-this.lam0),o=-this.r*f*(d(this.phi0)*k(j)-k(this.phi0)*d(j)*d(g-this.lam0)),l=this.r+m,n=this.r+o;return[l,n]},a.prototype._visible=function(a,b){return!0};return a}(),bA.equi=p,a=function(){function b(a){var c;c=this,a.lat0=0,b.__super__.constructor.call(this,a),c.lam0=0}var a;bU(b,V),b.title="Aitoff Projection",b.parameters=["lon0"],a=.6366197723675814,b.prototype.project=function(b,c){var d,e,f,g,h,i,j,k;g=this,k=g.ll(b,c),b=k[0],c=k[1],b=g.clon(b),f=g.rad(b),h=g.rad(c),d=.5*f,e=Math.acos(Math.cos(h)*Math.cos(d)),e!==0?(j=1/Math.sin(e),i=2*e*Math.cos(h)*Math.sin(d)*j,j*=e*Math.sin(h)):i=j=0,g.winkel&&(i=(i+f*a)*.5,j=(j+h)*.5);return[i*1e3,j*-1e3]},b.prototype._visible=function(a,b){return!0};return b}(),bA.aitoff=a,bm=function(){function b(a){b.__super__.constructor.call(this,a),this.winkel=!0}bU(b,a),b.title="Winkel Tripel Projection";return b}(),bA.winkel3=bm,l=function(){function a(b){var c,d,e;c=this,a.__super__.constructor.call(this,b),c.lat1=(d=b.lat1)!=null?d:30,c.phi1=c.rad(c.lat1),c.lat2=(e=b.lat2)!=null?e:50,c.phi2=c.rad(c.lat2)}bU(a,T),a.title="Conic Projection",a.parameters=["lon0","lat0","lat1","lat2"],a.prototype._visible=function(a,b){var c;c=this;return b>c.minLat&&b180&&(a-=360);return a};return a}(),C=function(){function a(b){var c,d,e,f,g,h,i,j,k,l,m,n,o;k=this,a.__super__.constructor.call(this,b),g=Math,o=[g.sin,g.cos,g.abs,g.log,g.tan,g.pow],l=o[0],e=o[1],c=o[2],bq=o[3],n=o[4],i=o[5],k.n=h=m=l(k.phi1),f=e(k.phi1),j=c(k.phi1-k.phi2)>=1e-10,j&&(h=bq(f/e(k.phi2))/bq(n(k.QUARTERPI+.5*k.phi2)/n(k.QUARTERPI+.5*k.phi1))),k.c=d=f*i(n(k.QUARTERPI+.5*k.phi1),h)/h,c(c(k.phi0)-k.HALFPI)<1e-10?k.rho0=0:k.rho0=d*i(n(k.QUARTERPI+.5*k.phi0),-h),k.minLat=-60,k.maxLat=85}bU(a,l),a.title="Lambert Conformal Conic Projection",a.prototype.project=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;l=this,i=l.rad(b),e=l.rad(l.clon(a)),g=Math,q=[g.sin,g.cos,g.abs,g.log,g.tan,g.pow],m=q[0],d=q[1],c=q[2],bq=q[3],n=q[4],j=q[5],h=l.n,c(c(i)-l.HALFPI)<1e-10?k=0:k=l.c*j(n(l.QUARTERPI+.5*i),-h),f=e*h,o=1e3*k*m(f),p=1e3*(l.rho0-k*d(f));return[o,p*-1]};return a}(),bA.lcc=C,U=function(){function a(){a.__super__.constructor.apply(this,arguments)}bU(a,l);return a}(),bj=function(){function a(a,b,c,d,e,f){var g;g=this,g.bbox=a,g.width=b,g.padding=d!=null?d:0,g.halign=e!=null?e:"center",g.valign=f!=null?f:"center",g.height=c,g.scale=Math.min((b-d*2)/a.width,(c-d*2)/a.height)}a.prototype.project=function(a,b){var c,d,e,f,g,h,i;b==null&&(b=a[1],a=a[0]),e=this,f=e.scale,c=e.bbox,d=e.height,g=e.width,h=e.halign==="center"?(g-c.width*f)*.5:e.halign==="left"?e.padding*f:g-(c.width-e.padding)*f,i=e.valign==="center"?(d-c.height*f)*.5:e.valign==="top"?e.padding*f:0,a=(a-c.left)*f+h,b=(b-c.top)*f+i;return[a,b]},a.prototype.projectPath=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;e=this;if(a.type==="path"){d=[],b=[99999,99999,-99999,-99999],o=a.contours;for(k=0,m=o.length;k0?(bB(a.duration)==="function"?i=a.duration(q):i=a.duration,a.delay!=null?bB(a.delay)==="function"?h=a.delay(q):h=a.delay:h=0,n.svgPath.attrs.fill==="none"&&(m=d(null,n.data),n.svgPath.attr("fill",m)),b=Raphael.animation({fill:c},i),n.svgPath.animate(b.delay(h))):n.svgPath.attr("fill",c)}}},bp.Kartograph.prototype.dotgrid=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V;r=this,q=(J=a.layer)!=null?J:r.layerIds[r.layerIds.length-1];if(!r.layers.hasOwnProperty(q))by('dotgrid error: layer "'+q+'" not found');else{p=r.layers[q],c=a.data,d=a.value,e=a.key,t={};if(e!=null&&bB(c)==="array")for(B=0,F=c.length;B0){if(h.grid.length===0)for(z=0,O=r.viewport.width;0<=O?z<=O:z>=O;z+=n)for(A=0,P=r.viewport.height;0<=P?A<=P:A>=P;A+=n){m={x:z+(Math.random()-.5)*n*.2,y:A+(Math.random()-.5)*n*.2,pathid:!1},l=!1,Q=p.pathsById;for(o in Q){u=Q[o];for(D=0,H=u.length;D0&&Raphael.svg?(b=Raphael.animation({r:x*.5},k),m.shape.animate(b.delay(g))):m.shape.attr({r:x*.5}),bB(i)==="function"?j=i(v):j=i,m.shape.attr(j))}}},bo=(bI=bp.filter)!=null?bI:bp.filter={},bo.__knownFilter={},bo.__patternFills=0,J.prototype.SVG=function(a,b){var c,d;typeof a=="string"&&(a=window.document.createElementNS("http://www.w3.org/2000/svg",a));if(b)for(c in b)d=b[c],a.setAttribute(c,d);return a},bp.Kartograph.prototype.addFilter=function(a,b,c){var d,e,f;c==null&&(c={}),f=this,d=window.document;if(bp.filter[b]!=null)e=(new bp.filter[b](c)).getFilter(a);else throw"unknown filter type "+b;return f.paper.defs.appendChild(e)},J.prototype.applyFilter=function(a){var b;b=this;return $("."+b.id,b.paper.canvas).attr({filter:"url(#"+a+")"})},J.prototype.applyTexture=function(a,b,c,d){var e,f,g,h,i,j;d==null&&(d="#fff"),f=this,bo.__patternFills+=1,i=f.paths,j=[];for(g=0,h=i.length;g0&&(m=g("feMorphology",{"in":"mask",radius:c,operator:"dilate",result:"mask"}),a.appendChild(m)),j=g("feColorMatrix",{"in":"mask",type:"matrix",values:"0 0 0 0 "+d[0]/255+" 0 0 0 0 "+d[1]/255+" 0 0 0 0 "+d[2]/255+" 0 0 0 1 0",result:"r0"}),a.appendChild(j),h=g("feGaussianBlur",{"in":"r0",stdDeviation:b,result:"r1"}),a.appendChild(h),i=g("feComposite",{operator:"out","in":"r1",in2:"mask",result:"comp"}),a.appendChild(i),l=g("feMerge"),f||l.appendChild(g("feMergeNode",{"in":"SourceGraphic"})),l.appendChild(g("feMergeNode",{"in":"r1"}));return a.appendChild(l)},a.prototype.innerGlow=function(a,b,c,d,e,f){var g,h,i,j,k,l,m;k=this,g=k.SVG,bq("innerglow"),j=g("feColorMatrix",{"in":"SourceGraphic",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 500 0",result:"mask"}),a.appendChild(j),m=g("feMorphology",{"in":"mask",radius:c,operator:"erode",result:"r1"}),a.appendChild(m),h=g("feGaussianBlur",{"in":"r1",stdDeviation:b,result:"r2"}),a.appendChild(h),j=g("feColorMatrix",{type:"matrix","in":"r2",values:"1 0 0 0 "+d[0]/255+" 0 1 0 0 "+d[1]/255+" 0 0 1 0 "+d[2]/255+" 0 0 0 -1 1",result:"r3"}),a.appendChild(j),i=g("feComposite",{operator:"in","in":"r3",in2:"mask",result:"comp"}),a.appendChild(i),l=g("feMerge"),f||l.appendChild(g("feMergeNode",{"in":"SourceGraphic"})),l.appendChild(g("feMergeNode",{"in":"comp"}));return a.appendChild(l)};return a}(),bo.glow=u,bw=typeof exports!="undefined"&&exports!==null?exports:this,bp=bw.$K=(bJ=bw.kartograph)!=null?bJ:bw.kartograph={},bp.Kartograph.prototype.addGeoPath=function(a,b,c){var d,e,f;b==null&&(b=[]),c==null&&(c=""),d=this,f=d.getGeoPathStr(a,b),e=d.paper.path(f),c!==""&&e.node.setAttribute("class",c);return e},bp.Kartograph.prototype.getGeoPathStr=function(a,b){var c,d,e,f,g,h,i;b==null&&(b=[]),e=this,type(b)==="string"&&(b=b.split("")),b.length===0&&b.push("M"),f="";for(d in a){g=a[d],c=(i=b[d])!=null?i:"L",h=e.lonlat2xy(g);if(isNaN(h[0])||isNaN(h[1]))continue;f+=c+h[0]+","+h[1]}return f},Q=function(){function a(a){this.zoomOut=bS(this.zoomOut,this),this.zoomIn=bS(this.zoomIn,this);var b,c,d,e,f,g,h,i;e=this,e.map=a,b=a.container,c=function(a,b){var c,d,e,f;b==null&&(b=[]),d=$('
');for(e=0,f=b.length;ef&&ah+f||g+ej+f||i+e(e+f)*(e+f)?!1:!0},a.prototype.render=function(a){var b;b=this,b.path=b.layers.mapcanvas.circle(b.x,b.y,b.radius),b.update(),b.map.applyStyles(b.path);return b},a.prototype.update=function(){var a,b;a=this,a.path.attr({x:a.x,y:a.y,r:a.radius}),b=a.path,b.node.setAttribute("style",a.style),b.node.setAttribute("class",a["class"]),a.title!=null&&b.attr("title",a.title);return a},a.prototype.clear=function(){var a;a=this,a.path.remove();return a},a.prototype.nodes=function(){var a;a=this;return[a.path.node]};return a}(),g.props=["radius","style","class","title"],g.layers=[],bp.Bubble=g,z=function(){function a(b){var c,d,e,f,g,h;c=this,a.__super__.constructor.call(this,b),c.icon=(d=b.icon)!=null?d:"",c.offset=(e=b.offset)!=null?e:[0,0],c.iconsize=(f=b.iconsize)!=null?f:[10,10],c["class"]=(g=b["class"])!=null?g:"",c.title=(h=b.title)!=null?h:""}bU(a,bp.Symbol),a.prototype.render=function(a){var b,c;c=this,b=c.map.container,c.img=$(""),c.img.attr({src:c.icon,title:c.title,alt:c.title,width:c.iconsize[0],height:c.iconsize[1]}),c.img.addClass(c["class"]),c.img.css({position:"absolute","z-index":1e3,cursor:"pointer"}),c.img[0].symbol=c,b.append(c.img);return c.update()},a.prototype.update=function(){var a;a=this;return a.img.css({left:a.x+a.offset[0]+"px",top:a.y+a.offset[1]+"px"})},a.prototype.clear=function(){var a;a=this,a.img.remove();return a},a.prototype.nodes=function(){var a;a=this;return[a.img]};return a}(),z.props=["icon","offset","class","title","iconsize"],z.layers=[],bp.Icon=z,bg=function(){function a(b){var c,d,e,f,g;c=this,a.__super__.constructor.call(this,b),c.text=(d=b.text)!=null?d:"",c.style=(e=b.style)!=null?e:"",c["class"]=(f=b["class"])!=null?f:"",c.offset=(g=b.offset)!=null?g:[0,0]}bU(a,bp.Symbol),a.prototype.render=function(a){var b,c;c=this,c.lbl=b=c.layers.mapcanvas.text(c.x,c.y,c.text),c.update();return c},a.prototype.update=function(){var a;a=this,a.lbl.attr({x:a.x+a.offset[0],y:a.y+a.offset[1]}),a.lbl.node.setAttribute("style",a.style);return a.lbl.node.setAttribute("class",a["class"])},a.prototype.clear=function(){var a;a=this,a.lbl.remove();return a},a.prototype.nodes=function(){var a;a=this;return[a.lbl.node]};return a}(),bg.props=["text","style","class","offset"],bg.layers=[],bp.Label=bg,y=function(){function a(b){var c,d,e,f;c=this,a.__super__.constructor.call(this,b),c.text=(d=b.text)!=null?d:"",c.style=(e=b.style)!=null?e:"",c["class"]=(f=b["class"])!=null?f:""}bU(a,bp.Symbol),a.prototype.render=function(a){var b,c,d;d=this,b=$("
"+d.text+"
"),b.css({width:"50px",position:"absolute",left:"-25px","text-align":"center"}),d.lbl=c=$('
'),c.append(b),d.layers.lbl.append(c),b.css({height:b.height()+"px",top:b.height()*-0.4+"px"}),d.update();return d},a.prototype.update=function(){var a;a=this;return a.lbl.css({position:"absolute",left:a.x+"px",top:a.y+"px"})},a.prototype.clear=function(){var a;a=this,a.lbl.remove();return a},a.prototype.nodes=function(){var a;a=this;return[a.lbl[0]]};return a}(),y.props=["text","style","class"],y.layers=[{id:"lbl",type:"html"}],bp.HtmlLabel=y,S=function(){function b(c){var d,e,f,g,h,i,j,k,l,m;a=this,b.__super__.constructor.call(this,c),a.radius=(e=c.radius)!=null?e:4,a.styles=(f=c.styles)!=null?f:"",a.colors=(g=c.colors)!=null?g:["#3cc","#c3c","#33c","#cc3"],a.titles=(h=c.titles)!=null?h:["","","","",""],a.values=(i=c.values)!=null?i:[],a.border=(j=c.border)!=null?j:!1,a.borderWidth=(k=c.borderWidth)!=null?k:2,a["class"]=(l=c["class"])!=null?l:"piechart",(m=(d=Raphael.fn).pieChart)==null&&(d.pieChart=bn)}var a;bU(b,bh),a=null,b.prototype.overlaps=function(b){var c,d,e,f,g,h,i,j,k,l;k=[a.x,a.y,a.radius],g=k[0],i=k[1],e=k[2],l=[b.x,b.y,b.radius],h=l[0],j=l[1],f=l[2];if(g-e>h+f||g+ej+f||i+e(e+f)*(e+f)?!1:!0},b.prototype.render=function(b){var c;a=this,a.border!=null&&(c=a.layers.mapcanvas.circle(a.x,a.y,a.radius+a.borderWidth).attr({stroke:"none",fill:a.border})),a.chart=a.layers.mapcanvas.pieChart(a.x,a.y,a.radius,a.values,a.titles,a.colors,"none"),a.chart.push(c);return a},b.prototype.update=function(b){var c;return},b.prototype.clear=function(){var b,c,d,e;a=this,e=a.chart;for(c=0,d=e.length;c180),0,h,j,"z"]).attr(f)},h=-270,o=0,l=function(e){var j,k,l,m,p,q,r;r=d[e],j=360*r/o,q=h+j*.5,k=f[e],m=500,l=30,p=n(a,b,c,h,h+j,{fill:k,stroke:g,"stroke-width":1}),p.mouseover(function(){p.stop().animate({transform:"s1.1 1.1 "+a+" "+b},m,"elastic")}),p.mouseout(function(){p.stop().animate({transform:""},m,"elastic")}),h+=j,i.push(p)};for(q=0,r=d.length;qh+f||g+ej+f||i+e(e+f)*(e+f)?!1:!0},a.prototype.render=function(a){var b,c,d,e,f,g;d=this,e=d.width,c=d.height,f=d.x,g=d.y,b=d.layers.mapcanvas.rect(f-e*.5-2,g-c*.5-2,e+4,c+4).attr({stroke:"none",fill:"#fff"}),d.chart=d.layers.mapcanvas.drawStackedBarChart(d.x,d.y,d.width,d.height,d.values,d.titles,d.colors,"none"),d.chart.push(b);return d},a.prototype.update=function(){var a,b;a=this;return},a.prototype.clear=function(){var a,b,c,d,e;a=this,e=a.chart;for(c=0,d=e.length;c + + + face.kml + + + + normal + #s_ylw-pushpin + + + highlight + #s_ylw-pushpin_hl + + + + + face + 1 + + eye1 + #m_ylw-pushpin + + 1 + + + + -22.84108109690709,1.094741753741488,0 -19.95990671858902,-3.277529093929444,0 -15.17253712172634,-4.608586114560899,0 -11.89023066450302,-0.9987485478080077,0 -11.95983147253712,2.923211724767504,0 -12.14380312363869,8.127497869906117,0 -14.15721785383536,9.893722081644221,0 -16.16724108982766,11.13126484851838,0 -20.19855985659539,10.99713650179376,0 -23.46166501661987,7.415580109323032,0 -22.84108109690709,1.094741753741488,0 + + + + + + + eye2 + #m_ylw-pushpin + + 1 + + + + 19.07715081919449,8.702449871272291,0 16.08389286128222,4.538472953733577,0 16.19449557806102,-1.784826611267607,0 18.61187788424816,-4.266728717674408,0 23.45733543323506,-6.162217954237443,0 28.9739838106361,-5.199690218791002,0 30.23188345651623,0.3874339839748837,0 30.27686976676865,6.048839821320162,0 27.42646648383636,8.816308770610712,0 23.93231077246995,9.157495205473888,0 19.07715081919449,8.702449871272291,0 + + + + + + + nose + #m_ylw-pushpin + + 1 + + + + -1.546647687731134,-9.238569695931114,0 -5.373940783367138,-26.8641890883665,0 -0.1783001453333244,-29.37148840132801,0 6.297801677714938,-25.21456855366846,0 1.593871248939718,-10.23620769411285,0 -1.546647687731134,-9.238569695931114,0 + + + + + + + mouth + #m_ylw-pushpin + + 1 + + + + -24.03600996736765,-45.62766039876369,0 -15.99261219899054,-51.01999623546102,0 -3.097682550751394,-53.06926847276708,0 7.259201100500505,-50.58944978125696,0 19.36600901012944,-45.79021978116995,0 22.9648920337342,-39.66033878111115,0 17.63355310113724,-42.48625424887653,0 4.633418774955129,-44.2865778572567,0 -7.067411127833831,-45.06730005694861,0 -17.8215322738582,-42.48403265695245,0 -22.78702023804825,-38.11666854699747,0 -24.03600996736765,-45.62766039876369,0 + + + + + + + ear1 + #m_ylw-pushpin + + 1 + + + + 72.58981314041048,-0.555513833208415,0 75.50510196490143,-0.08657718980887676,0 78.77838580747519,0.005728901134004867,0 79.54513239395816,-3.701760372707271,0 78.26455865345798,-7.155424506539739,0 74.5652401501592,-9.919949246869121,0 75.2331616242158,-12.59880400932902,0 78.566075177529,-12.59786000048784,0 84.36495839229362,-10.7194189859683,0 86.58956084843703,-7.131994175601452,0 86.66512259582525,-1.540729830051405,0 86.03573608230457,2.721507027403067,0 82.5532481404921,5.57155356220048,0 75.80388850733556,3.325504868290263,0 72.8119615033322,1.759608995521281,0 72.58981314041048,-0.555513833208415,0 + + + + + + + Polygon ohne Namen + #m_ylw-pushpin + + 1 + + + + -63.4847569759294,-0.1179955125591082,0 -67.62235327825927,1.868992004535198,0 -72.12610491172011,1.800716365967807,0 -73.53560608661026,-1.434413288411882,0 -73.75391338466196,-4.749407336253636,0 -73.5500248569676,-9.882044005343644,0 -71.26327595960137,-12.80005976045174,0 -68.24467350674051,-15.1127317930387,0 -61.2035466079141,-14.47923491237966,0 -63.1305149513415,-10.15919031554479,0 -66.12709880179108,-8.326896385304538,0 -66.33585820478068,-4.724862228190934,0 -63.87800883266753,-4.206990011883674,0 -63.4847569759294,-0.1179955125591082,0 + + + + + + + hair + #m_ylw-pushpin + + 1 + + + + -56.48648274774474,14.81744692003963,0 -50.4060983525764,19.82271763095407,0 -42.12148531085298,20.65140899341347,0 -29.69086509813802,23.74333304777413,0 -24.54045342869818,23.14875009863743,0 -22.48273677559574,27.33567055098807,0 -9.976515446070563,27.67576775055484,0 -4.977837021549233,23.96406966388886,0 2.567172590508475,28.30363734948023,0 14.54539802326389,23.10719470304556,0 21.23111406540732,26.49342186912154,0 32.91828273323413,19.03321730246731,0 40.47571966397343,25.62983000163413,0 51.47288738456796,23.00808485944966,0 62.20843210392125,32.09410525407498,0 83.89450565798491,14.91869789623331,0 94.83830891009694,10.50313612546472,0 95.91766206299562,-1.589799771919341,0 107.7692841046569,-18.27721442790113,0 122.6433007403652,-28.50983975696784,0 140.7115478274921,-31.52737928894286,0 150.1633813459576,-28.41693686591668,0 176.3008410424883,-34.64818641640628,0 194.7419653373171,-30.42185017150405,0 215.7361811939829,-21.6155273106059,0 228.2646495298676,-24.98854702274637,0 246.0835233216863,-31.01779760002771,0 259.1996577642117,-28.53129732425479,0 267.4926928245971,-17.98974361985528,0 276.6366535812497,-8.834235505009229,0 282.9547037317914,9.132178062927572,0 290.4022158766186,7.570100448796643,0 292.9106152257615,19.78491072589098,0 299.133959589841,21.15952605929459,0 299.5887163247107,17.46274448355062,0 296.3451396366905,18.94373471930419,0 -56.48648274774474,14.81744692003963,0 + + + + + + + + diff --git a/showcase/projections/face.kml.txt b/showcase/projections/face.kml.txt index 29b48be..c56536d 100644 --- a/showcase/projections/face.kml.txt +++ b/showcase/projections/face.kml.txt @@ -2,9 +2,18 @@ face.kml - + +