travlrmap 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- data/config/travlrmap.yaml.dist +6 -3
- data/lib/travlrmap/version.rb +1 -1
- data/public/cluster/cluster-AQUA-1.png +0 -0
- data/public/cluster/cluster-AQUA-2.png +0 -0
- data/public/cluster/cluster-AQUA-3.png +0 -0
- data/public/cluster/cluster-AQUA-4.png +0 -0
- data/public/cluster/cluster-AQUA-5.png +0 -0
- data/public/cluster/cluster-BLACK-1.png +0 -0
- data/public/cluster/cluster-BLACK-2.png +0 -0
- data/public/cluster/cluster-BLACK-3.png +0 -0
- data/public/cluster/cluster-BLACK-4.png +0 -0
- data/public/cluster/cluster-BLACK-5.png +0 -0
- data/public/cluster/cluster-BLUE-1.png +0 -0
- data/public/cluster/cluster-BLUE-2.png +0 -0
- data/public/cluster/cluster-BLUE-3.png +0 -0
- data/public/cluster/cluster-BLUE-4.png +0 -0
- data/public/cluster/cluster-BLUE-5.png +0 -0
- data/public/cluster/cluster-FUCHSIA-1.png +0 -0
- data/public/cluster/cluster-FUCHSIA-2.png +0 -0
- data/public/cluster/cluster-FUCHSIA-3.png +0 -0
- data/public/cluster/cluster-FUCHSIA-4.png +0 -0
- data/public/cluster/cluster-FUCHSIA-5.png +0 -0
- data/public/cluster/cluster-GRAY-1.png +0 -0
- data/public/cluster/cluster-GRAY-2.png +0 -0
- data/public/cluster/cluster-GRAY-3.png +0 -0
- data/public/cluster/cluster-GRAY-4.png +0 -0
- data/public/cluster/cluster-GRAY-5.png +0 -0
- data/public/cluster/cluster-GREEN-1.png +0 -0
- data/public/cluster/cluster-GREEN-2.png +0 -0
- data/public/cluster/cluster-GREEN-3.png +0 -0
- data/public/cluster/cluster-GREEN-4.png +0 -0
- data/public/cluster/cluster-GREEN-5.png +0 -0
- data/public/cluster/cluster-LIME-1.png +0 -0
- data/public/cluster/cluster-LIME-2.png +0 -0
- data/public/cluster/cluster-LIME-3.png +0 -0
- data/public/cluster/cluster-LIME-4.png +0 -0
- data/public/cluster/cluster-LIME-5.png +0 -0
- data/public/cluster/cluster-MAROON-1.png +0 -0
- data/public/cluster/cluster-MAROON-2.png +0 -0
- data/public/cluster/cluster-MAROON-3.png +0 -0
- data/public/cluster/cluster-MAROON-4.png +0 -0
- data/public/cluster/cluster-MAROON-5.png +0 -0
- data/public/cluster/cluster-NAVY-1.png +0 -0
- data/public/cluster/cluster-NAVY-2.png +0 -0
- data/public/cluster/cluster-NAVY-3.png +0 -0
- data/public/cluster/cluster-NAVY-4.png +0 -0
- data/public/cluster/cluster-NAVY-5.png +0 -0
- data/public/cluster/cluster-OLIVE-1.png +0 -0
- data/public/cluster/cluster-OLIVE-2.png +0 -0
- data/public/cluster/cluster-OLIVE-3.png +0 -0
- data/public/cluster/cluster-OLIVE-4.png +0 -0
- data/public/cluster/cluster-OLIVE-5.png +0 -0
- data/public/cluster/cluster-ORANGE-1.png +0 -0
- data/public/cluster/cluster-ORANGE-2.png +0 -0
- data/public/cluster/cluster-ORANGE-3.png +0 -0
- data/public/cluster/cluster-ORANGE-4.png +0 -0
- data/public/cluster/cluster-ORANGE-5.png +0 -0
- data/public/cluster/cluster-PURPLE-1.png +0 -0
- data/public/cluster/cluster-PURPLE-2.png +0 -0
- data/public/cluster/cluster-PURPLE-3.png +0 -0
- data/public/cluster/cluster-PURPLE-4.png +0 -0
- data/public/cluster/cluster-PURPLE-5.png +0 -0
- data/public/cluster/cluster-RED-1.png +0 -0
- data/public/cluster/cluster-RED-2.png +0 -0
- data/public/cluster/cluster-RED-3.png +0 -0
- data/public/cluster/cluster-RED-4.png +0 -0
- data/public/cluster/cluster-RED-5.png +0 -0
- data/public/cluster/cluster-SILVER-1.png +0 -0
- data/public/cluster/cluster-SILVER-2.png +0 -0
- data/public/cluster/cluster-SILVER-3.png +0 -0
- data/public/cluster/cluster-SILVER-4.png +0 -0
- data/public/cluster/cluster-SILVER-5.png +0 -0
- data/public/cluster/cluster-TEAL-1.png +0 -0
- data/public/cluster/cluster-TEAL-2.png +0 -0
- data/public/cluster/cluster-TEAL-3.png +0 -0
- data/public/cluster/cluster-TEAL-4.png +0 -0
- data/public/cluster/cluster-TEAL-5.png +0 -0
- data/public/cluster/cluster-WHITE-1.png +0 -0
- data/public/cluster/cluster-WHITE-2.png +0 -0
- data/public/cluster/cluster-WHITE-3.png +0 -0
- data/public/cluster/cluster-WHITE-4.png +0 -0
- data/public/cluster/cluster-WHITE-5.png +0 -0
- data/public/cluster/cluster-YELLOW-1.png +0 -0
- data/public/cluster/cluster-YELLOW-2.png +0 -0
- data/public/cluster/cluster-YELLOW-3.png +0 -0
- data/public/cluster/cluster-YELLOW-4.png +0 -0
- data/public/cluster/cluster-YELLOW-5.png +0 -0
- data/public/{images → cluster}/m1.png +0 -0
- data/public/{images → cluster}/m2.png +0 -0
- data/public/{images → cluster}/m3.png +0 -0
- data/public/{images → cluster}/m4.png +0 -0
- data/public/{images → cluster}/m5.png +0 -0
- data/public/markerclusterer_compiled.js +1 -21
- data/public/markers/marker-AQUA-LARGE.png +0 -0
- data/public/markers/marker-AQUA-MINI.png +0 -0
- data/public/markers/marker-AQUA-REGULAR.png +0 -0
- data/public/markers/marker-BLACK-LARGE.png +0 -0
- data/public/markers/marker-BLACK-MINI.png +0 -0
- data/public/markers/marker-BLACK-REGULAR.png +0 -0
- data/public/markers/marker-BLUE-LARGE.png +0 -0
- data/public/markers/marker-BLUE-MINI.png +0 -0
- data/public/markers/marker-BLUE-REGULAR.png +0 -0
- data/public/markers/marker-FUCHSIA-LARGE.png +0 -0
- data/public/markers/marker-FUCHSIA-MINI.png +0 -0
- data/public/markers/marker-FUCHSIA-REGULAR.png +0 -0
- data/public/markers/marker-GRAY-LARGE.png +0 -0
- data/public/markers/marker-GRAY-MINI.png +0 -0
- data/public/markers/marker-GRAY-REGULAR.png +0 -0
- data/public/markers/marker-GREEN-LARGE.png +0 -0
- data/public/markers/marker-GREEN-MINI.png +0 -0
- data/public/markers/marker-GREEN-REGULAR.png +0 -0
- data/public/markers/marker-LIME-LARGE.png +0 -0
- data/public/markers/marker-LIME-MINI.png +0 -0
- data/public/markers/marker-LIME-REGULAR.png +0 -0
- data/public/markers/marker-MAROON-LARGE.png +0 -0
- data/public/markers/marker-MAROON-MINI.png +0 -0
- data/public/markers/marker-MAROON-REGULAR.png +0 -0
- data/public/markers/marker-NAVY-LARGE.png +0 -0
- data/public/markers/marker-NAVY-MINI.png +0 -0
- data/public/markers/marker-NAVY-REGULAR.png +0 -0
- data/public/markers/marker-OLIVE-LARGE.png +0 -0
- data/public/markers/marker-OLIVE-MINI.png +0 -0
- data/public/markers/marker-OLIVE-REGULAR.png +0 -0
- data/public/markers/marker-ORANGE-LARGE.png +0 -0
- data/public/markers/marker-ORANGE-MINI.png +0 -0
- data/public/markers/marker-ORANGE-REGULAR.png +0 -0
- data/public/markers/marker-PURPLE-LARGE.png +0 -0
- data/public/markers/marker-PURPLE-MINI.png +0 -0
- data/public/markers/marker-PURPLE-REGULAR.png +0 -0
- data/public/markers/marker-RED-LARGE.png +0 -0
- data/public/markers/marker-RED-MINI.png +0 -0
- data/public/markers/marker-RED-REGULAR.png +0 -0
- data/public/markers/marker-SILVER-LARGE.png +0 -0
- data/public/markers/marker-SILVER-MINI.png +0 -0
- data/public/markers/marker-SILVER-REGULAR.png +0 -0
- data/public/markers/marker-TEAL-LARGE.png +0 -0
- data/public/markers/marker-TEAL-MINI.png +0 -0
- data/public/markers/marker-TEAL-REGULAR.png +0 -0
- data/public/markers/marker-WHITE-LARGE.png +0 -0
- data/public/markers/marker-WHITE-MINI.png +0 -0
- data/public/markers/marker-WHITE-REGULAR.png +0 -0
- data/public/markers/marker-YELLOW-LARGE.png +0 -0
- data/public/markers/marker-YELLOW-MINI.png +0 -0
- data/public/markers/marker-YELLOW-REGULAR.png +0 -0
- data/views/_map_js.erb +7 -1
- data/views/_point_comment.erb +18 -11
- data/views/index.erb +8 -0
- data/views/layout.erb +0 -1
- metadata +145 -35
- data/public/images/conv30.png +0 -0
- data/public/images/conv40.png +0 -0
- data/public/images/conv50.png +0 -0
- data/public/images/heart30.png +0 -0
- data/public/images/heart40.png +0 -0
- data/public/images/heart50.png +0 -0
- data/public/images/people35.png +0 -0
- data/public/images/people45.png +0 -0
- data/public/images/people55.png +0 -0
- data/public/markers/marker-AQUA-BLANK.png +0 -0
- data/public/markers/marker-BLUE-BLANK.png +0 -0
- data/public/markers/marker-GRAY-BLANK.png +0 -0
- data/public/markers/marker-GREEN-BLANK.png +0 -0
- data/public/markers/marker-ORANGE-BLANK.png +0 -0
- data/public/markers/marker-PURPLE-BLANK.png +0 -0
- data/public/markers/marker-RED-BLANK.png +0 -0
- data/public/markers/marker-WHITE-BLANK.png +0 -0
- data/public/markers/mini-AQUA-BLANK.png +0 -0
- data/public/markers/mini-BLUE-BLANK.png +0 -0
- data/public/markers/mini-GRAY-BLANK.png +0 -0
- data/public/markers/mini-GREEN-BLANK.png +0 -0
- data/public/markers/mini-ORANGE-BLANK.png +0 -0
- data/public/markers/mini-PURPLE-BLANK.png +0 -0
- data/public/markers/mini-RED-BLANK.png +0 -0
- data/public/markers/mini-WHITE-BLANK.png +0 -0
- data/views/_footer.erb +0 -8
data/config/travlrmap.yaml.dist
CHANGED
@@ -14,6 +14,9 @@
|
|
14
14
|
:cluster_grid_size: 40
|
15
15
|
:cluster_minumum_size: 2
|
16
16
|
:cluster_zoom_on_click: true
|
17
|
+
:cluster_image_path: /cluster/cluster-RED-
|
18
|
+
:cluster_image_extension: png
|
19
|
+
:cluster_image_sizes: [24, 26, 31, 37, 43]
|
17
20
|
|
18
21
|
:views:
|
19
22
|
:default:
|
@@ -29,11 +32,11 @@
|
|
29
32
|
|
30
33
|
:types:
|
31
34
|
:visit:
|
32
|
-
:icon:
|
35
|
+
:icon: /markers/marker-RED-REGULAR.png
|
33
36
|
:description: Visit
|
34
37
|
:transit:
|
35
|
-
:icon:
|
38
|
+
:icon: /markers/marker-BLUE-REGULAR.png
|
36
39
|
:description: Transit
|
37
40
|
:lived:
|
38
|
-
:icon:
|
41
|
+
:icon: /markers/marker-GREEN-REGULAR.png
|
39
42
|
:description: Lived
|
data/lib/travlrmap/version.rb
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,21 +1 @@
|
|
1
|
-
(function(){var d=null;function e(a){return function(b){this[a]=b}}function h(a){return function(){return this[a]}}var j;
|
2
|
-
function k(a,b,c){this.extend(k,google.maps.OverlayView);this.c=a;this.a=[];this.f=[];this.ca=[53,56,66,78,90];this.j=[];this.A=!1;c=c||{};this.g=c.gridSize||60;this.l=c.minimumClusterSize||2;this.J=c.maxZoom||d;this.j=c.styles||[];this.X=c.imagePath||this.Q;this.W=c.imageExtension||this.P;this.O=!0;if(c.zoomOnClick!=void 0)this.O=c.zoomOnClick;this.r=!1;if(c.averageCenter!=void 0)this.r=c.averageCenter;l(this);this.setMap(a);this.K=this.c.getZoom();var f=this;google.maps.event.addListener(this.c,
|
3
|
-
"zoom_changed",function(){var a=f.c.getZoom();if(f.K!=a)f.K=a,f.m()});google.maps.event.addListener(this.c,"idle",function(){f.i()});b&&b.length&&this.C(b,!1)}j=k.prototype;j.Q="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/images/m";j.P="png";j.extend=function(a,b){return function(a){for(var b in a.prototype)this.prototype[b]=a.prototype[b];return this}.apply(a,[b])};j.onAdd=function(){if(!this.A)this.A=!0,n(this)};j.draw=function(){};
|
4
|
-
function l(a){if(!a.j.length)for(var b=0,c;c=a.ca[b];b++)a.j.push({url:a.X+(b+1)+"."+a.W,height:c,width:c})}j.S=function(){for(var a=this.o(),b=new google.maps.LatLngBounds,c=0,f;f=a[c];c++)b.extend(f.getPosition());this.c.fitBounds(b)};j.z=h("j");j.o=h("a");j.V=function(){return this.a.length};j.ba=e("J");j.I=h("J");j.G=function(a,b){for(var c=0,f=a.length,g=f;g!==0;)g=parseInt(g/10,10),c++;c=Math.min(c,b);return{text:f,index:c}};j.$=e("G");j.H=h("G");
|
5
|
-
j.C=function(a,b){for(var c=0,f;f=a[c];c++)q(this,f);b||this.i()};function q(a,b){b.s=!1;b.draggable&&google.maps.event.addListener(b,"dragend",function(){b.s=!1;a.L()});a.a.push(b)}j.q=function(a,b){q(this,a);b||this.i()};function r(a,b){var c=-1;if(a.a.indexOf)c=a.a.indexOf(b);else for(var f=0,g;g=a.a[f];f++)if(g==b){c=f;break}if(c==-1)return!1;b.setMap(d);a.a.splice(c,1);return!0}j.Y=function(a,b){var c=r(this,a);return!b&&c?(this.m(),this.i(),!0):!1};
|
6
|
-
j.Z=function(a,b){for(var c=!1,f=0,g;g=a[f];f++)g=r(this,g),c=c||g;if(!b&&c)return this.m(),this.i(),!0};j.U=function(){return this.f.length};j.getMap=h("c");j.setMap=e("c");j.w=h("g");j.aa=e("g");
|
7
|
-
j.v=function(a){var b=this.getProjection(),c=new google.maps.LatLng(a.getNorthEast().lat(),a.getNorthEast().lng()),f=new google.maps.LatLng(a.getSouthWest().lat(),a.getSouthWest().lng()),c=b.fromLatLngToDivPixel(c);c.x+=this.g;c.y-=this.g;f=b.fromLatLngToDivPixel(f);f.x-=this.g;f.y+=this.g;c=b.fromDivPixelToLatLng(c);b=b.fromDivPixelToLatLng(f);a.extend(c);a.extend(b);return a};j.R=function(){this.m(!0);this.a=[]};
|
8
|
-
j.m=function(a){for(var b=0,c;c=this.f[b];b++)c.remove();for(b=0;c=this.a[b];b++)c.s=!1,a&&c.setMap(d);this.f=[]};j.L=function(){var a=this.f.slice();this.f.length=0;this.m();this.i();window.setTimeout(function(){for(var b=0,c;c=a[b];b++)c.remove()},0)};j.i=function(){n(this)};
|
9
|
-
function n(a){if(a.A)for(var b=a.v(new google.maps.LatLngBounds(a.c.getBounds().getSouthWest(),a.c.getBounds().getNorthEast())),c=0,f;f=a.a[c];c++)if(!f.s&&b.contains(f.getPosition())){for(var g=a,u=4E4,o=d,v=0,m=void 0;m=g.f[v];v++){var i=m.getCenter();if(i){var p=f.getPosition();if(!i||!p)i=0;else var w=(p.lat()-i.lat())*Math.PI/180,x=(p.lng()-i.lng())*Math.PI/180,i=Math.sin(w/2)*Math.sin(w/2)+Math.cos(i.lat()*Math.PI/180)*Math.cos(p.lat()*Math.PI/180)*Math.sin(x/2)*Math.sin(x/2),i=6371*2*Math.atan2(Math.sqrt(i),
|
10
|
-
Math.sqrt(1-i));i<u&&(u=i,o=m)}}o&&o.F.contains(f.getPosition())?o.q(f):(m=new s(g),m.q(f),g.f.push(m))}}function s(a){this.k=a;this.c=a.getMap();this.g=a.w();this.l=a.l;this.r=a.r;this.d=d;this.a=[];this.F=d;this.n=new t(this,a.z(),a.w())}j=s.prototype;
|
11
|
-
j.q=function(a){var b;a:if(this.a.indexOf)b=this.a.indexOf(a)!=-1;else{b=0;for(var c;c=this.a[b];b++)if(c==a){b=!0;break a}b=!1}if(b)return!1;if(this.d){if(this.r)c=this.a.length+1,b=(this.d.lat()*(c-1)+a.getPosition().lat())/c,c=(this.d.lng()*(c-1)+a.getPosition().lng())/c,this.d=new google.maps.LatLng(b,c),y(this)}else this.d=a.getPosition(),y(this);a.s=!0;this.a.push(a);b=this.a.length;b<this.l&&a.getMap()!=this.c&&a.setMap(this.c);if(b==this.l)for(c=0;c<b;c++)this.a[c].setMap(d);b>=this.l&&a.setMap(d);
|
12
|
-
a=this.c.getZoom();if((b=this.k.I())&&a>b)for(a=0;b=this.a[a];a++)b.setMap(this.c);else if(this.a.length<this.l)z(this.n);else{b=this.k.H()(this.a,this.k.z().length);this.n.setCenter(this.d);a=this.n;a.B=b;a.ga=b.text;a.ea=b.index;if(a.b)a.b.innerHTML=b.text;b=Math.max(0,a.B.index-1);b=Math.min(a.j.length-1,b);b=a.j[b];a.da=b.url;a.h=b.height;a.p=b.width;a.M=b.textColor;a.e=b.anchor;a.N=b.textSize;a.D=b.backgroundPosition;this.n.show()}return!0};
|
13
|
-
j.getBounds=function(){for(var a=new google.maps.LatLngBounds(this.d,this.d),b=this.o(),c=0,f;f=b[c];c++)a.extend(f.getPosition());return a};j.remove=function(){this.n.remove();this.a.length=0;delete this.a};j.T=function(){return this.a.length};j.o=h("a");j.getCenter=h("d");function y(a){a.F=a.k.v(new google.maps.LatLngBounds(a.d,a.d))}j.getMap=h("c");
|
14
|
-
function t(a,b,c){a.k.extend(t,google.maps.OverlayView);this.j=b;this.fa=c||0;this.u=a;this.d=d;this.c=a.getMap();this.B=this.b=d;this.t=!1;this.setMap(this.c)}j=t.prototype;
|
15
|
-
j.onAdd=function(){this.b=document.createElement("DIV");if(this.t)this.b.style.cssText=A(this,B(this,this.d)),this.b.innerHTML=this.B.text;this.getPanes().overlayMouseTarget.appendChild(this.b);var a=this;google.maps.event.addDomListener(this.b,"click",function(){var b=a.u.k;google.maps.event.trigger(b,"clusterclick",a.u);b.O&&a.c.fitBounds(a.u.getBounds())})};function B(a,b){var c=a.getProjection().fromLatLngToDivPixel(b);c.x-=parseInt(a.p/2,10);c.y-=parseInt(a.h/2,10);return c}
|
16
|
-
j.draw=function(){if(this.t){var a=B(this,this.d);this.b.style.top=a.y+"px";this.b.style.left=a.x+"px"}};function z(a){if(a.b)a.b.style.display="none";a.t=!1}j.show=function(){if(this.b)this.b.style.cssText=A(this,B(this,this.d)),this.b.style.display="";this.t=!0};j.remove=function(){this.setMap(d)};j.onRemove=function(){if(this.b&&this.b.parentNode)z(this),this.b.parentNode.removeChild(this.b),this.b=d};j.setCenter=e("d");
|
17
|
-
function A(a,b){var c=[];c.push("background-image:url("+a.da+");");c.push("background-position:"+(a.D?a.D:"0 0")+";");typeof a.e==="object"?(typeof a.e[0]==="number"&&a.e[0]>0&&a.e[0]<a.h?c.push("height:"+(a.h-a.e[0])+"px; padding-top:"+a.e[0]+"px;"):c.push("height:"+a.h+"px; line-height:"+a.h+"px;"),typeof a.e[1]==="number"&&a.e[1]>0&&a.e[1]<a.p?c.push("width:"+(a.p-a.e[1])+"px; padding-left:"+a.e[1]+"px;"):c.push("width:"+a.p+"px; text-align:center;")):c.push("height:"+a.h+"px; line-height:"+a.h+
|
18
|
-
"px; width:"+a.p+"px; text-align:center;");c.push("cursor:pointer; top:"+b.y+"px; left:"+b.x+"px; color:"+(a.M?a.M:"black")+"; position:absolute; font-size:"+(a.N?a.N:11)+"px; font-family:Arial,sans-serif; font-weight:bold");return c.join("")}window.MarkerClusterer=k;k.prototype.addMarker=k.prototype.q;k.prototype.addMarkers=k.prototype.C;k.prototype.clearMarkers=k.prototype.R;k.prototype.fitMapToMarkers=k.prototype.S;k.prototype.getCalculator=k.prototype.H;k.prototype.getGridSize=k.prototype.w;
|
19
|
-
k.prototype.getExtendedBounds=k.prototype.v;k.prototype.getMap=k.prototype.getMap;k.prototype.getMarkers=k.prototype.o;k.prototype.getMaxZoom=k.prototype.I;k.prototype.getStyles=k.prototype.z;k.prototype.getTotalClusters=k.prototype.U;k.prototype.getTotalMarkers=k.prototype.V;k.prototype.redraw=k.prototype.i;k.prototype.removeMarker=k.prototype.Y;k.prototype.removeMarkers=k.prototype.Z;k.prototype.resetViewport=k.prototype.m;k.prototype.repaint=k.prototype.L;k.prototype.setCalculator=k.prototype.$;
|
20
|
-
k.prototype.setGridSize=k.prototype.aa;k.prototype.setMaxZoom=k.prototype.ba;k.prototype.onAdd=k.prototype.onAdd;k.prototype.draw=k.prototype.draw;s.prototype.getCenter=s.prototype.getCenter;s.prototype.getSize=s.prototype.T;s.prototype.getMarkers=s.prototype.o;t.prototype.onAdd=t.prototype.onAdd;t.prototype.draw=t.prototype.draw;t.prototype.onRemove=t.prototype.onRemove;
|
21
|
-
})();
|
1
|
+
function ClusterIcon(cluster,styles){cluster.getMarkerClusterer().extend(ClusterIcon,google.maps.OverlayView);this.cluster_=cluster;this.className_=cluster.getMarkerClusterer().getClusterClass();this.styles_=styles;this.center_=null;this.div_=null;this.sums_=null;this.visible_=false;this.setMap(cluster.getMap())}ClusterIcon.prototype.onAdd=function(){var cClusterIcon=this;var cMouseDownInCluster;var cDraggingMapByCluster;this.div_=document.createElement("div");this.div_.className=this.className_;if(this.visible_){this.show()}this.getPanes().overlayMouseTarget.appendChild(this.div_);this.boundsChangedListener_=google.maps.event.addListener(this.getMap(),"bounds_changed",function(){cDraggingMapByCluster=cMouseDownInCluster});google.maps.event.addDomListener(this.div_,"mousedown",function(){cMouseDownInCluster=true;cDraggingMapByCluster=false});google.maps.event.addDomListener(this.div_,"click",function(e){cMouseDownInCluster=false;if(!cDraggingMapByCluster){var theBounds;var mz;var mc=cClusterIcon.cluster_.getMarkerClusterer();google.maps.event.trigger(mc,"click",cClusterIcon.cluster_);google.maps.event.trigger(mc,"clusterclick",cClusterIcon.cluster_);if(mc.getZoomOnClick()){mz=mc.getMaxZoom();theBounds=cClusterIcon.cluster_.getBounds();mc.getMap().fitBounds(theBounds);setTimeout(function(){mc.getMap().fitBounds(theBounds);if(mz!==null&&(mc.getMap().getZoom()>mz)){mc.getMap().setZoom(mz+1)}},100)}e.cancelBubble=true;if(e.stopPropagation){e.stopPropagation()}}});google.maps.event.addDomListener(this.div_,"mouseover",function(){var mc=cClusterIcon.cluster_.getMarkerClusterer();google.maps.event.trigger(mc,"mouseover",cClusterIcon.cluster_)});google.maps.event.addDomListener(this.div_,"mouseout",function(){var mc=cClusterIcon.cluster_.getMarkerClusterer();google.maps.event.trigger(mc,"mouseout",cClusterIcon.cluster_)})};ClusterIcon.prototype.onRemove=function(){if(this.div_&&this.div_.parentNode){this.hide();google.maps.event.removeListener(this.boundsChangedListener_);google.maps.event.clearInstanceListeners(this.div_);this.div_.parentNode.removeChild(this.div_);this.div_=null}};ClusterIcon.prototype.draw=function(){if(this.visible_){var pos=this.getPosFromLatLng_(this.center_);this.div_.style.top=pos.y+"px";this.div_.style.left=pos.x+"px"}};ClusterIcon.prototype.hide=function(){if(this.div_){this.div_.style.display="none"}this.visible_=false};ClusterIcon.prototype.show=function(){if(this.div_){var img="";var bp=this.backgroundPosition_.split(" ");var spriteH=parseInt(bp[0].trim(),10);var spriteV=parseInt(bp[1].trim(),10);var pos=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(pos);img="<img src='"+this.url_+"' style='position: absolute; top: "+spriteV+"px; left: "+spriteH+"px; ";if(!this.cluster_.getMarkerClusterer().enableRetinaIcons_){img+="clip: rect("+(-1*spriteV)+"px, "+((-1*spriteH)+this.width_)+"px, "+((-1*spriteV)+this.height_)+"px, "+(-1*spriteH)+"px);"}else{img+="width: "+this.width_+"px;"+"height: "+this.height_+"px;"}img+="'>";this.div_.innerHTML=img+"<div style='"+"position: absolute;"+"top: "+this.anchorText_[0]+"px;"+"left: "+this.anchorText_[1]+"px;"+"color: "+this.textColor_+";"+"font-size: "+this.textSize_+"px;"+"font-family: "+this.fontFamily_+";"+"font-weight: "+this.fontWeight_+";"+"font-style: "+this.fontStyle_+";"+"text-decoration: "+this.textDecoration_+";"+"text-align: center;"+"width: "+this.width_+"px;"+"line-height:"+this.height_+"px;"+"'>"+(this.cluster_.hideLabel_?' ':this.sums_.text)+"</div>";if(typeof this.sums_.title==="undefined"||this.sums_.title===""){this.div_.title=this.cluster_.getMarkerClusterer().getTitle()}else{this.div_.title=this.sums_.title}this.div_.style.display=""}this.visible_=true};ClusterIcon.prototype.useStyle=function(sums){this.sums_=sums;var index=Math.max(0,sums.index-1);index=Math.min(this.styles_.length-1,index);var style=this.styles_[index];this.url_=style.url;this.height_=style.height;this.width_=style.width;this.anchorText_=style.anchorText||[0,0];this.anchorIcon_=style.anchorIcon||[parseInt(this.height_/2,10),parseInt(this.width_/2,10)];this.textColor_=style.textColor||"black";this.textSize_=style.textSize||11;this.textDecoration_=style.textDecoration||"none";this.fontWeight_=style.fontWeight||"bold";this.fontStyle_=style.fontStyle||"normal";this.fontFamily_=style.fontFamily||"Arial,sans-serif";this.backgroundPosition_=style.backgroundPosition||"0 0"};ClusterIcon.prototype.setCenter=function(center){this.center_=center};ClusterIcon.prototype.createCss=function(pos){var style=[];style.push("cursor: pointer;");style.push("position: absolute; top: "+pos.y+"px; left: "+pos.x+"px;");style.push("width: "+this.width_+"px; height: "+this.height_+"px;");return style.join("")};ClusterIcon.prototype.getPosFromLatLng_=function(latlng){var pos=this.getProjection().fromLatLngToDivPixel(latlng);pos.x-=this.anchorIcon_[1];pos.y-=this.anchorIcon_[0];pos.x=parseInt(pos.x,10);pos.y=parseInt(pos.y,10);return pos};function Cluster(mc){this.markerClusterer_=mc;this.map_=mc.getMap();this.gridSize_=mc.getGridSize();this.minClusterSize_=mc.getMinimumClusterSize();this.averageCenter_=mc.getAverageCenter();this.hideLabel_=mc.getHideLabel();this.markers_=[];this.center_=null;this.bounds_=null;this.clusterIcon_=new ClusterIcon(this,mc.getStyles())}Cluster.prototype.getSize=function(){return this.markers_.length};Cluster.prototype.getMarkers=function(){return this.markers_};Cluster.prototype.getCenter=function(){return this.center_};Cluster.prototype.getMap=function(){return this.map_};Cluster.prototype.getMarkerClusterer=function(){return this.markerClusterer_};Cluster.prototype.getBounds=function(){var i;var bounds=new google.maps.LatLngBounds(this.center_,this.center_);var markers=this.getMarkers();for(i=0;i<markers.length;i++){bounds.extend(markers[i].getPosition())}return bounds};Cluster.prototype.remove=function(){this.clusterIcon_.setMap(null);this.markers_=[];delete this.markers_};Cluster.prototype.addMarker=function(marker){var i;var mCount;var mz;if(this.isMarkerAlreadyAdded_(marker)){return false}if(!this.center_){this.center_=marker.getPosition();this.calculateBounds_()}else{if(this.averageCenter_){var l=this.markers_.length+1;var lat=(this.center_.lat()*(l-1)+marker.getPosition().lat())/l;var lng=(this.center_.lng()*(l-1)+marker.getPosition().lng())/l;this.center_=new google.maps.LatLng(lat,lng);this.calculateBounds_()}}marker.isAdded=true;this.markers_.push(marker);mCount=this.markers_.length;mz=this.markerClusterer_.getMaxZoom();if(mz!==null&&this.map_.getZoom()>mz){if(marker.getMap()!==this.map_){marker.setMap(this.map_)}}else if(mCount<this.minClusterSize_){if(marker.getMap()!==this.map_){marker.setMap(this.map_)}}else if(mCount===this.minClusterSize_){for(i=0;i<mCount;i++){this.markers_[i].setMap(null)}}else{marker.setMap(null)}return true};Cluster.prototype.isMarkerInClusterBounds=function(marker){return this.bounds_.contains(marker.getPosition())};Cluster.prototype.calculateBounds_=function(){var bounds=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(bounds)};Cluster.prototype.updateIcon_=function(){var mCount=this.markers_.length;var mz=this.markerClusterer_.getMaxZoom();if(mz!==null&&this.map_.getZoom()>mz){this.clusterIcon_.hide();return}if(mCount<this.minClusterSize_){this.clusterIcon_.hide();return}var numStyles=this.markerClusterer_.getStyles().length;var sums=this.markerClusterer_.getCalculator()(this.markers_,numStyles);this.clusterIcon_.setCenter(this.center_);this.clusterIcon_.useStyle(sums);this.clusterIcon_.show()};Cluster.prototype.isMarkerAlreadyAdded_=function(marker){for(var i=0,n=this.markers_.length;i<n;i++){if(marker===this.markers_[i]){return true}}return false};function MarkerClusterer(map,opt_markers,opt_options){this.extend(MarkerClusterer,google.maps.OverlayView);opt_markers=opt_markers||[];opt_options=opt_options||{};this.markers_=[];this.clusters_=[];this.listeners_=[];this.activeMap_=null;this.ready_=false;this.gridSize_=opt_options.gridSize||60;this.minClusterSize_=opt_options.minimumClusterSize||2;this.maxZoom_=opt_options.maxZoom||null;this.styles_=opt_options.styles||[];this.title_=opt_options.title||"";this.zoomOnClick_=true;if(opt_options.zoomOnClick!==undefined){this.zoomOnClick_=opt_options.zoomOnClick}this.averageCenter_=false;if(opt_options.averageCenter!==undefined){this.averageCenter_=opt_options.averageCenter}this.ignoreHidden_=false;if(opt_options.ignoreHidden!==undefined){this.ignoreHidden_=opt_options.ignoreHidden}this.enableRetinaIcons_=false;if(opt_options.enableRetinaIcons!==undefined){this.enableRetinaIcons_=opt_options.enableRetinaIcons}this.hideLabel_=false;if(opt_options.hideLabel!==undefined){this.hideLabel_=opt_options.hideLabel}this.imagePath_=opt_options.imagePath||MarkerClusterer.IMAGE_PATH;this.imageExtension_=opt_options.imageExtension||MarkerClusterer.IMAGE_EXTENSION;this.imageSizes_=opt_options.imageSizes||MarkerClusterer.IMAGE_SIZES;this.calculator_=opt_options.calculator||MarkerClusterer.CALCULATOR;this.batchSize_=opt_options.batchSize||MarkerClusterer.BATCH_SIZE;this.batchSizeIE_=opt_options.batchSizeIE||MarkerClusterer.BATCH_SIZE_IE;this.clusterClass_=opt_options.clusterClass||"cluster";if(navigator.userAgent.toLowerCase().indexOf("msie")!==-1){this.batchSize_=this.batchSizeIE_}this.setupStyles_();this.addMarkers(opt_markers,true);this.setMap(map)}MarkerClusterer.prototype.onAdd=function(){var cMarkerClusterer=this;this.activeMap_=this.getMap();this.ready_=true;this.repaint();this.listeners_=[google.maps.event.addListener(this.getMap(),"zoom_changed",function(){cMarkerClusterer.resetViewport_(false);if(this.getZoom()===(this.get("minZoom")||0)||this.getZoom()===this.get("maxZoom")){google.maps.event.trigger(this,"idle")}}),google.maps.event.addListener(this.getMap(),"idle",function(){cMarkerClusterer.redraw_()})]};MarkerClusterer.prototype.onRemove=function(){var i;for(i=0;i<this.markers_.length;i++){if(this.markers_[i].getMap()!==this.activeMap_){this.markers_[i].setMap(this.activeMap_)}}for(i=0;i<this.clusters_.length;i++){this.clusters_[i].remove()}this.clusters_=[];for(i=0;i<this.listeners_.length;i++){google.maps.event.removeListener(this.listeners_[i])}this.listeners_=[];this.activeMap_=null;this.ready_=false};MarkerClusterer.prototype.draw=function(){};MarkerClusterer.prototype.setupStyles_=function(){var i,size;if(this.styles_.length>0){return}for(i=0;i<this.imageSizes_.length;i++){size=this.imageSizes_[i];this.styles_.push({url:this.imagePath_+(i+1)+"."+this.imageExtension_,height:size,width:size})}};MarkerClusterer.prototype.fitMapToMarkers=function(){var i;var markers=this.getMarkers();var bounds=new google.maps.LatLngBounds();for(i=0;i<markers.length;i++){bounds.extend(markers[i].getPosition())}this.getMap().fitBounds(bounds)};MarkerClusterer.prototype.getGridSize=function(){return this.gridSize_};MarkerClusterer.prototype.setGridSize=function(gridSize){this.gridSize_=gridSize};MarkerClusterer.prototype.getMinimumClusterSize=function(){return this.minClusterSize_};MarkerClusterer.prototype.setMinimumClusterSize=function(minimumClusterSize){this.minClusterSize_=minimumClusterSize};MarkerClusterer.prototype.getMaxZoom=function(){return this.maxZoom_};MarkerClusterer.prototype.setMaxZoom=function(maxZoom){this.maxZoom_=maxZoom};MarkerClusterer.prototype.getStyles=function(){return this.styles_};MarkerClusterer.prototype.setStyles=function(styles){this.styles_=styles};MarkerClusterer.prototype.getTitle=function(){return this.title_};MarkerClusterer.prototype.setTitle=function(title){this.title_=title};MarkerClusterer.prototype.getZoomOnClick=function(){return this.zoomOnClick_};MarkerClusterer.prototype.setZoomOnClick=function(zoomOnClick){this.zoomOnClick_=zoomOnClick};MarkerClusterer.prototype.getAverageCenter=function(){return this.averageCenter_};MarkerClusterer.prototype.setAverageCenter=function(averageCenter){this.averageCenter_=averageCenter};MarkerClusterer.prototype.getIgnoreHidden=function(){return this.ignoreHidden_};MarkerClusterer.prototype.setIgnoreHidden=function(ignoreHidden){this.ignoreHidden_=ignoreHidden};MarkerClusterer.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons_};MarkerClusterer.prototype.setEnableRetinaIcons=function(enableRetinaIcons){this.enableRetinaIcons_=enableRetinaIcons};MarkerClusterer.prototype.getImageExtension=function(){return this.imageExtension_};MarkerClusterer.prototype.setImageExtension=function(imageExtension){this.imageExtension_=imageExtension};MarkerClusterer.prototype.getImagePath=function(){return this.imagePath_};MarkerClusterer.prototype.setImagePath=function(imagePath){this.imagePath_=imagePath};MarkerClusterer.prototype.getImageSizes=function(){return this.imageSizes_};MarkerClusterer.prototype.setImageSizes=function(imageSizes){this.imageSizes_=imageSizes};MarkerClusterer.prototype.getCalculator=function(){return this.calculator_};MarkerClusterer.prototype.setCalculator=function(calculator){this.calculator_=calculator};MarkerClusterer.prototype.setHideLabel=function(hideLabel){this.hideLabel_=hideLabel};MarkerClusterer.prototype.getHideLabel=function(){return this.hideLabel_};MarkerClusterer.prototype.getBatchSizeIE=function(){return this.batchSizeIE_};MarkerClusterer.prototype.setBatchSizeIE=function(batchSizeIE){this.batchSizeIE_=batchSizeIE};MarkerClusterer.prototype.getClusterClass=function(){return this.clusterClass_};MarkerClusterer.prototype.setClusterClass=function(clusterClass){this.clusterClass_=clusterClass};MarkerClusterer.prototype.getMarkers=function(){return this.markers_};MarkerClusterer.prototype.getTotalMarkers=function(){return this.markers_.length};MarkerClusterer.prototype.getClusters=function(){return this.clusters_};MarkerClusterer.prototype.getTotalClusters=function(){return this.clusters_.length};MarkerClusterer.prototype.addMarker=function(marker,opt_nodraw){this.pushMarkerTo_(marker);if(!opt_nodraw){this.redraw_()}};MarkerClusterer.prototype.addMarkers=function(markers,opt_nodraw){var key;for(key in markers){if(markers.hasOwnProperty(key)){this.pushMarkerTo_(markers[key])}}if(!opt_nodraw){this.redraw_()}};MarkerClusterer.prototype.pushMarkerTo_=function(marker){if(marker.getDraggable()){var cMarkerClusterer=this;google.maps.event.addListener(marker,"dragend",function(){if(cMarkerClusterer.ready_){this.isAdded=false;cMarkerClusterer.repaint()}})}marker.isAdded=false;this.markers_.push(marker)};MarkerClusterer.prototype.removeMarker=function(marker,opt_nodraw,opt_noMapRemove){var removeFromMap=true&&!opt_noMapRemove;var removed=this.removeMarker_(marker,removeFromMap);if(!opt_nodraw&&removed){this.repaint()}return removed};MarkerClusterer.prototype.removeMarkers=function(markers,opt_nodraw,opt_noMapRemove){var i,r;var removed=false;var removeFromMap=true&&!opt_noMapRemove;for(i=0;i<markers.length;i++){r=this.removeMarker_(markers[i],removeFromMap);removed=removed||r}if(!opt_nodraw&&removed){this.repaint()}return removed};MarkerClusterer.prototype.removeMarker_=function(marker,removeFromMap){var i;var index=-1;if(this.markers_.indexOf){index=this.markers_.indexOf(marker)}else{for(i=0;i<this.markers_.length;i++){if(marker===this.markers_[i]){index=i;break}}}if(index===-1){return false}if(removeFromMap){marker.setMap(null)}this.markers_.splice(index,1);return true};MarkerClusterer.prototype.clearMarkers=function(){this.resetViewport_(true);this.markers_=[]};MarkerClusterer.prototype.repaint=function(){var oldClusters=this.clusters_.slice();this.clusters_=[];this.resetViewport_(false);this.redraw_();setTimeout(function(){var i;for(i=0;i<oldClusters.length;i++){oldClusters[i].remove()}},0)};MarkerClusterer.prototype.getExtendedBounds=function(bounds){var projection=this.getProjection();var tr=new google.maps.LatLng(bounds.getNorthEast().lat(),bounds.getNorthEast().lng());var bl=new google.maps.LatLng(bounds.getSouthWest().lat(),bounds.getSouthWest().lng());var trPix=projection.fromLatLngToDivPixel(tr);trPix.x+=this.gridSize_;trPix.y-=this.gridSize_;var blPix=projection.fromLatLngToDivPixel(bl);blPix.x-=this.gridSize_;blPix.y+=this.gridSize_;var ne=projection.fromDivPixelToLatLng(trPix);var sw=projection.fromDivPixelToLatLng(blPix);bounds.extend(ne);bounds.extend(sw);return bounds};MarkerClusterer.prototype.redraw_=function(){this.createClusters_(0)};MarkerClusterer.prototype.resetViewport_=function(opt_hide){var i,marker;for(i=0;i<this.clusters_.length;i++){this.clusters_[i].remove()}this.clusters_=[];for(i=0;i<this.markers_.length;i++){marker=this.markers_[i];marker.isAdded=false;if(opt_hide){marker.setMap(null)}}};MarkerClusterer.prototype.distanceBetweenPoints_=function(p1,p2){var R=6371;var dLat=(p2.lat()-p1.lat())*Math.PI/180;var dLon=(p2.lng()-p1.lng())*Math.PI/180;var a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(p1.lat()*Math.PI/180)*Math.cos(p2.lat()*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);var c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));var d=R*c;return d};MarkerClusterer.prototype.isMarkerInBounds_=function(marker,bounds){return bounds.contains(marker.getPosition())};MarkerClusterer.prototype.addToClosestCluster_=function(marker){var i,d,cluster,center;var distance=40000;var clusterToAddTo=null;for(i=0;i<this.clusters_.length;i++){cluster=this.clusters_[i];center=cluster.getCenter();if(center){d=this.distanceBetweenPoints_(center,marker.getPosition());if(d<distance){distance=d;clusterToAddTo=cluster}}}if(clusterToAddTo&&clusterToAddTo.isMarkerInClusterBounds(marker)){clusterToAddTo.addMarker(marker)}else{cluster=new Cluster(this);cluster.addMarker(marker);this.clusters_.push(cluster)}};MarkerClusterer.prototype.createClusters_=function(iFirst){var i,marker;var mapBounds;var cMarkerClusterer=this;if(!this.ready_){return}if(iFirst===0){google.maps.event.trigger(this,"clusteringbegin",this);if(typeof this.timerRefStatic!=="undefined"){clearTimeout(this.timerRefStatic);delete this.timerRefStatic}}if(this.getMap().getZoom()>3){mapBounds=new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast())}else{mapBounds=new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625))}var bounds=this.getExtendedBounds(mapBounds);var iLast=Math.min(iFirst+this.batchSize_,this.markers_.length);for(i=iFirst;i<iLast;i++){marker=this.markers_[i];if(!marker.isAdded&&this.isMarkerInBounds_(marker,bounds)){if(!this.ignoreHidden_||(this.ignoreHidden_&&marker.getVisible())){this.addToClosestCluster_(marker)}}}if(iLast<this.markers_.length){this.timerRefStatic=setTimeout(function(){cMarkerClusterer.createClusters_(iLast)},0)}else{delete this.timerRefStatic;google.maps.event.trigger(this,"clusteringend",this);for(i=0;i<this.clusters_.length;i++){this.clusters_[i].updateIcon_()}}};MarkerClusterer.prototype.extend=function(obj1,obj2){return(function(object){var property;for(property in object.prototype){this.prototype[property]=object.prototype[property]}return this}).apply(obj1,[obj2])};MarkerClusterer.CALCULATOR=function(markers,numStyles){var index=0;var title="";var count=markers.length.toString();var dv=count;while(dv!==0){dv=parseInt(dv/10,10);index++}index=Math.min(index,numStyles);return{text:count,index:index,title:title}};MarkerClusterer.BATCH_SIZE=2000;MarkerClusterer.BATCH_SIZE_IE=500;MarkerClusterer.IMAGE_PATH="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/images/m";MarkerClusterer.IMAGE_EXTENSION="png";MarkerClusterer.IMAGE_SIZES=[53,56,66,78,90];if(typeof String.prototype.trim!=='function'){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,'')}}
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/views/_map_js.erb
CHANGED
@@ -32,7 +32,13 @@
|
|
32
32
|
options = {
|
33
33
|
gridSize: <%= @map.fetch(:cluster_grid_size, 40) %>,
|
34
34
|
minimumClusterSize: <%= @map.fetch(:cluster_minumum_size, 2) %>,
|
35
|
-
zoomOnClick: <%= @map.fetch(:cluster_zoom_on_click, true)
|
35
|
+
zoomOnClick: <%= @map.fetch(:cluster_zoom_on_click, true) %>,
|
36
|
+
imagePath: '<%= @map.fetch(:cluster_image_path, "/cluster/t") %>',
|
37
|
+
imageExtension: '<%= @map.fetch(:cluster_image_extension, "png") %>',
|
38
|
+
<% if @map.include?(:cluster_image_sizes) %>
|
39
|
+
imageSizes: [<%= @map[:cluster_image_sizes].join(",") %>],
|
40
|
+
<% end %>
|
41
|
+
averageCenter: true
|
36
42
|
};
|
37
43
|
|
38
44
|
return new MarkerClusterer(map, [], options);
|
data/views/_point_comment.erb
CHANGED
@@ -1,15 +1,22 @@
|
|
1
1
|
<p>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
<%
|
9
|
-
<%=
|
2
|
+
<font size="+2"><%= point[:title] %></font>
|
3
|
+
<hr>
|
4
|
+
<% if point[:comment] %>
|
5
|
+
<%= h point[:comment] %><br /><br />
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<% if point[:href] %>
|
9
|
+
<a href='<%= point[:href] %>' target='_blank'>
|
10
|
+
<% if point[:linkimg] || point[:linktext] %>
|
11
|
+
<% if point[:linkimg] %>
|
12
|
+
<img src='<%= point[:linkimg] %>'><br />
|
13
|
+
<% end %>
|
14
|
+
<% if point[:linktext] %>
|
15
|
+
<%= h point[:linktext] %>
|
16
|
+
<% end %>
|
17
|
+
<% else %>
|
18
|
+
Link
|
10
19
|
<% end %>
|
11
|
-
|
12
|
-
<% elsif point[:comment] %>
|
13
|
-
<%= h point[:comment] %>
|
20
|
+
</a>
|
14
21
|
<% end %>
|
15
22
|
</p>
|
data/views/index.erb
CHANGED
@@ -1,2 +1,10 @@
|
|
1
1
|
<div class="map" id="main_map"> </div>
|
2
2
|
<%= erb :"_map_js", :layout => false %>
|
3
|
+
<div align=center>
|
4
|
+
<br />
|
5
|
+
<% @config[:types].sort_by{|_, s| s[:description]}.each do |_, settings| %>
|
6
|
+
<img src="<%= settings[:icon] %>"> <%= settings[:description] %>
|
7
|
+
<% end %>
|
8
|
+
<br />
|
9
|
+
<%= @points.size %> locations in <%= @points.map{|p| p[:country]}.uniq.size %> countries
|
10
|
+
</div>
|
data/views/layout.erb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: travlrmap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 14
|
10
|
+
version: 0.0.14
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- R.I.Pienaar
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2015-01-
|
18
|
+
date: 2015-01-04 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -135,42 +135,152 @@ files:
|
|
135
135
|
- views/layout.erb
|
136
136
|
- views/index.erb
|
137
137
|
- views/_point_comment.erb
|
138
|
-
- views/_footer.erb
|
139
138
|
- views/_map_js.erb
|
140
|
-
- public/images/conv30.png
|
141
|
-
- public/images/conv50.png
|
142
|
-
- public/images/m1.png
|
143
|
-
- public/images/conv40.png
|
144
|
-
- public/images/people55.png
|
145
|
-
- public/images/people45.png
|
146
|
-
- public/images/heart50.png
|
147
|
-
- public/images/heart40.png
|
148
|
-
- public/images/m4.png
|
149
|
-
- public/images/m5.png
|
150
|
-
- public/images/people35.png
|
151
|
-
- public/images/m3.png
|
152
|
-
- public/images/heart30.png
|
153
|
-
- public/images/m2.png
|
154
139
|
- public/travlrmap.css
|
155
140
|
- public/favicon.ico
|
156
141
|
- public/markerclusterer_compiled.js
|
157
142
|
- public/gmaps.js
|
158
|
-
- public/markers/marker-
|
159
|
-
- public/markers/
|
160
|
-
- public/markers/
|
161
|
-
- public/markers/marker-
|
162
|
-
- public/markers/
|
163
|
-
- public/markers/
|
164
|
-
- public/markers/
|
165
|
-
- public/markers/
|
166
|
-
- public/markers/marker-
|
167
|
-
- public/markers/marker-
|
168
|
-
- public/markers/marker-
|
169
|
-
- public/markers/marker-
|
170
|
-
- public/markers/marker-
|
171
|
-
- public/markers/marker-
|
172
|
-
- public/markers/
|
173
|
-
- public/markers/
|
143
|
+
- public/markers/marker-NAVY-MINI.png
|
144
|
+
- public/markers/marker-NAVY-REGULAR.png
|
145
|
+
- public/markers/marker-SILVER-MINI.png
|
146
|
+
- public/markers/marker-PURPLE-LARGE.png
|
147
|
+
- public/markers/marker-BLUE-MINI.png
|
148
|
+
- public/markers/marker-ORANGE-LARGE.png
|
149
|
+
- public/markers/marker-BLUE-LARGE.png
|
150
|
+
- public/markers/marker-BLACK-MINI.png
|
151
|
+
- public/markers/marker-FUCHSIA-MINI.png
|
152
|
+
- public/markers/marker-ORANGE-REGULAR.png
|
153
|
+
- public/markers/marker-BLACK-REGULAR.png
|
154
|
+
- public/markers/marker-BLACK-LARGE.png
|
155
|
+
- public/markers/marker-GREEN-MINI.png
|
156
|
+
- public/markers/marker-OLIVE-LARGE.png
|
157
|
+
- public/markers/marker-SILVER-LARGE.png
|
158
|
+
- public/markers/marker-RED-REGULAR.png
|
159
|
+
- public/markers/marker-TEAL-LARGE.png
|
160
|
+
- public/markers/marker-GRAY-MINI.png
|
161
|
+
- public/markers/marker-SILVER-REGULAR.png
|
162
|
+
- public/markers/marker-MAROON-MINI.png
|
163
|
+
- public/markers/marker-OLIVE-REGULAR.png
|
164
|
+
- public/markers/marker-PURPLE-REGULAR.png
|
165
|
+
- public/markers/marker-WHITE-MINI.png
|
166
|
+
- public/markers/marker-OLIVE-MINI.png
|
167
|
+
- public/markers/marker-WHITE-LARGE.png
|
168
|
+
- public/markers/marker-YELLOW-LARGE.png
|
169
|
+
- public/markers/marker-AQUA-REGULAR.png
|
170
|
+
- public/markers/marker-FUCHSIA-REGULAR.png
|
171
|
+
- public/markers/marker-ORANGE-MINI.png
|
172
|
+
- public/markers/marker-TEAL-REGULAR.png
|
173
|
+
- public/markers/marker-LIME-MINI.png
|
174
|
+
- public/markers/marker-AQUA-LARGE.png
|
175
|
+
- public/markers/marker-MAROON-REGULAR.png
|
176
|
+
- public/markers/marker-FUCHSIA-LARGE.png
|
177
|
+
- public/markers/marker-BLUE-REGULAR.png
|
178
|
+
- public/markers/marker-LIME-REGULAR.png
|
179
|
+
- public/markers/marker-WHITE-REGULAR.png
|
180
|
+
- public/markers/marker-YELLOW-REGULAR.png
|
181
|
+
- public/markers/marker-YELLOW-MINI.png
|
182
|
+
- public/markers/marker-AQUA-MINI.png
|
183
|
+
- public/markers/marker-GREEN-LARGE.png
|
184
|
+
- public/markers/marker-LIME-LARGE.png
|
185
|
+
- public/markers/marker-NAVY-LARGE.png
|
186
|
+
- public/markers/marker-GRAY-LARGE.png
|
187
|
+
- public/markers/marker-TEAL-MINI.png
|
188
|
+
- public/markers/marker-GREEN-REGULAR.png
|
189
|
+
- public/markers/marker-RED-LARGE.png
|
190
|
+
- public/markers/marker-MAROON-LARGE.png
|
191
|
+
- public/markers/marker-RED-MINI.png
|
192
|
+
- public/markers/marker-PURPLE-MINI.png
|
193
|
+
- public/markers/marker-GRAY-REGULAR.png
|
194
|
+
- public/cluster/cluster-ORANGE-2.png
|
195
|
+
- public/cluster/cluster-YELLOW-1.png
|
196
|
+
- public/cluster/cluster-TEAL-5.png
|
197
|
+
- public/cluster/cluster-BLUE-2.png
|
198
|
+
- public/cluster/cluster-YELLOW-4.png
|
199
|
+
- public/cluster/cluster-BLACK-1.png
|
200
|
+
- public/cluster/cluster-MAROON-1.png
|
201
|
+
- public/cluster/cluster-AQUA-4.png
|
202
|
+
- public/cluster/cluster-TEAL-1.png
|
203
|
+
- public/cluster/cluster-BLACK-2.png
|
204
|
+
- public/cluster/cluster-MAROON-3.png
|
205
|
+
- public/cluster/cluster-SILVER-1.png
|
206
|
+
- public/cluster/cluster-MAROON-2.png
|
207
|
+
- public/cluster/cluster-GRAY-5.png
|
208
|
+
- public/cluster/cluster-YELLOW-2.png
|
209
|
+
- public/cluster/cluster-WHITE-5.png
|
210
|
+
- public/cluster/cluster-OLIVE-4.png
|
211
|
+
- public/cluster/cluster-RED-4.png
|
212
|
+
- public/cluster/cluster-PURPLE-3.png
|
213
|
+
- public/cluster/cluster-ORANGE-4.png
|
214
|
+
- public/cluster/m1.png
|
215
|
+
- public/cluster/cluster-BLACK-3.png
|
216
|
+
- public/cluster/cluster-LIME-1.png
|
217
|
+
- public/cluster/cluster-YELLOW-5.png
|
218
|
+
- public/cluster/cluster-AQUA-5.png
|
219
|
+
- public/cluster/cluster-BLACK-4.png
|
220
|
+
- public/cluster/cluster-GRAY-1.png
|
221
|
+
- public/cluster/cluster-WHITE-2.png
|
222
|
+
- public/cluster/cluster-WHITE-4.png
|
223
|
+
- public/cluster/cluster-RED-1.png
|
224
|
+
- public/cluster/cluster-OLIVE-5.png
|
225
|
+
- public/cluster/cluster-MAROON-5.png
|
226
|
+
- public/cluster/cluster-NAVY-3.png
|
227
|
+
- public/cluster/cluster-TEAL-4.png
|
228
|
+
- public/cluster/cluster-PURPLE-2.png
|
229
|
+
- public/cluster/cluster-GREEN-1.png
|
230
|
+
- public/cluster/cluster-YELLOW-3.png
|
231
|
+
- public/cluster/cluster-AQUA-2.png
|
232
|
+
- public/cluster/cluster-FUCHSIA-5.png
|
233
|
+
- public/cluster/cluster-BLUE-5.png
|
234
|
+
- public/cluster/cluster-LIME-2.png
|
235
|
+
- public/cluster/cluster-BLUE-4.png
|
236
|
+
- public/cluster/cluster-BLUE-1.png
|
237
|
+
- public/cluster/cluster-SILVER-3.png
|
238
|
+
- public/cluster/cluster-GREEN-2.png
|
239
|
+
- public/cluster/cluster-RED-2.png
|
240
|
+
- public/cluster/cluster-GRAY-4.png
|
241
|
+
- public/cluster/cluster-RED-3.png
|
242
|
+
- public/cluster/cluster-PURPLE-4.png
|
243
|
+
- public/cluster/cluster-GREEN-4.png
|
244
|
+
- public/cluster/cluster-NAVY-5.png
|
245
|
+
- public/cluster/cluster-TEAL-3.png
|
246
|
+
- public/cluster/cluster-GRAY-3.png
|
247
|
+
- public/cluster/cluster-BLUE-3.png
|
248
|
+
- public/cluster/cluster-SILVER-5.png
|
249
|
+
- public/cluster/cluster-ORANGE-5.png
|
250
|
+
- public/cluster/cluster-FUCHSIA-4.png
|
251
|
+
- public/cluster/cluster-LIME-3.png
|
252
|
+
- public/cluster/cluster-WHITE-1.png
|
253
|
+
- public/cluster/cluster-NAVY-2.png
|
254
|
+
- public/cluster/m4.png
|
255
|
+
- public/cluster/cluster-LIME-4.png
|
256
|
+
- public/cluster/cluster-SILVER-2.png
|
257
|
+
- public/cluster/cluster-SILVER-4.png
|
258
|
+
- public/cluster/cluster-WHITE-3.png
|
259
|
+
- public/cluster/cluster-TEAL-2.png
|
260
|
+
- public/cluster/cluster-RED-5.png
|
261
|
+
- public/cluster/cluster-BLACK-5.png
|
262
|
+
- public/cluster/m5.png
|
263
|
+
- public/cluster/cluster-OLIVE-3.png
|
264
|
+
- public/cluster/cluster-GRAY-2.png
|
265
|
+
- public/cluster/cluster-NAVY-4.png
|
266
|
+
- public/cluster/cluster-OLIVE-1.png
|
267
|
+
- public/cluster/cluster-OLIVE-2.png
|
268
|
+
- public/cluster/cluster-ORANGE-1.png
|
269
|
+
- public/cluster/cluster-AQUA-3.png
|
270
|
+
- public/cluster/cluster-NAVY-1.png
|
271
|
+
- public/cluster/cluster-FUCHSIA-2.png
|
272
|
+
- public/cluster/cluster-FUCHSIA-3.png
|
273
|
+
- public/cluster/cluster-AQUA-1.png
|
274
|
+
- public/cluster/cluster-GREEN-5.png
|
275
|
+
- public/cluster/m3.png
|
276
|
+
- public/cluster/cluster-ORANGE-3.png
|
277
|
+
- public/cluster/cluster-FUCHSIA-1.png
|
278
|
+
- public/cluster/cluster-LIME-5.png
|
279
|
+
- public/cluster/cluster-PURPLE-1.png
|
280
|
+
- public/cluster/cluster-GREEN-3.png
|
281
|
+
- public/cluster/m2.png
|
282
|
+
- public/cluster/cluster-PURPLE-5.png
|
283
|
+
- public/cluster/cluster-MAROON-4.png
|
174
284
|
- config/travlrmap.yaml.dist
|
175
285
|
- config.ru
|
176
286
|
- Gemfile
|
data/public/images/conv30.png
DELETED
Binary file
|
data/public/images/conv40.png
DELETED
Binary file
|
data/public/images/conv50.png
DELETED
Binary file
|
data/public/images/heart30.png
DELETED
Binary file
|
data/public/images/heart40.png
DELETED
Binary file
|
data/public/images/heart50.png
DELETED
Binary file
|
data/public/images/people35.png
DELETED
Binary file
|
data/public/images/people45.png
DELETED
Binary file
|
data/public/images/people55.png
DELETED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/views/_footer.erb
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
<div align=center>
|
2
|
-
<br />
|
3
|
-
<% @config[:types].sort_by{|_, s| s[:description]}.each do |_, settings| %>
|
4
|
-
<img src="<%= settings[:icon] %>"> <%= settings[:description] %>
|
5
|
-
<% end %>
|
6
|
-
<br />
|
7
|
-
<%= @points.size %> locations in <%= @points.map{|p| p[:country]}.uniq.size %> countries
|
8
|
-
</div>
|