100 |
100 |
101 function polygon_to_gmap(polycoords, label) { |
101 function polygon_to_gmap(polycoords, label) { |
102 var _opts = { |
102 var _opts = { |
103 strokeColor: "#000000", |
103 strokeColor: "#000000", |
104 strokeWeight: .5, |
104 strokeWeight: .5, |
105 fillColor: "#000080", |
105 fillColor: "#7070a0", |
106 fillOpacity: .8, |
106 fillOpacity: .8, |
107 } |
107 } |
108 _opts.paths = polycoords.map(function(path) { |
108 _opts.paths = polycoords.map(function(path) { |
109 return path.map(function(coord) { |
109 return path.map(function(coord) { |
110 return new google.maps.LatLng(coord[1], coord[0]); |
110 return new google.maps.LatLng(coord[1], coord[0]); |
111 }); |
111 }); |
112 }); |
112 }); |
113 var _polygon = new google.maps.Polygon(_opts); |
113 var _polygon = new google.maps.Polygon(_opts); |
114 _polygon.setMap(gomNs.map); |
114 _polygon.setMap(gomNs.map); |
115 google.maps.event.addListener(_polygon, 'click', function(a,b) { |
115 if (label) { |
116 tagInfo(label); |
116 google.maps.event.addListener(_polygon, 'click', function(a,b) { |
117 }) |
117 tagInfo(label); |
|
118 }) |
|
119 } |
118 return _polygon; |
120 return _polygon; |
119 } |
121 } |
120 |
122 |
121 function showCountries(geoJson) { |
123 function showCountries(geoJson) { |
122 gomNs.countries = {}; |
124 gomNs.countries = {}; |