@@ -54,6 +54,7 @@ $(document).ready(function () {
5454 } ) ;
5555 // Create a blank array that will hold the country list for drawing border polygons
5656 var countryList = [ ] ;
57+ var tcl = [ ] ;
5758 // Set the zoom level based on the type of map
5859 if ( mapType == 'country' ) {
5960 if ( countryBounds [ window . countryCode ] [ 2 ] != null ) {
@@ -100,29 +101,50 @@ $(document).ready(function () {
100101 $ . each ( countryMapData , function ( i , v ) {
101102 var calculatedOpacity = calculateOpacity ( v . extra . budget , maxBudget ) ;
102103 var fOpacity = 0.8 ;
103- // if (v.extra.id == 'SO') {
104- // calculatedOpacity = 0;
105- // fOpacity = 0;
106- // }
107- var tempMapBorder = {
108- "type" : "Feature" ,
109- "properties" : {
110- "popupContent" : getPopupHTML ( v . extra ) ,
111- "style" : {
112- stroke : true ,
113- weight : 1 ,
114- color : "white" ,
115- opacity : calculatedOpacity ,
116- fillColor : calculateBrightness ( v . extra . budget , maxBudget ) ,
117- fillOpacity : fOpacity
104+ if ( v . extra . id == 'SO' || v . extra . id == '-99SOM' ) {
105+ calculatedOpacity = 0 ;
106+ fOpacity = 0 ;
107+ var tempMapBorder = {
108+ "type" : "Feature" ,
109+ "properties" : {
110+ "popupContent" : getPopupHTML ( v . extra ) ,
111+ "style" : {
112+ stroke : true ,
113+ weight : 0 ,
114+ color : "white" ,
115+ opacity : calculatedOpacity ,
116+ fillColor : calculateBrightness ( v . extra . budget , maxBudget ) ,
117+ fillOpacity : fOpacity
118+ }
119+ } ,
120+ "geometry" : {
121+ "type" : v . geometry . type ,
122+ "coordinates" : v . geometry . coordinates
118123 }
119- } ,
120- "geometry" : {
121- "type" : v . geometry . type ,
122- "coordinates" : v . geometry . coordinates
123- }
124- } ;
125- countryList . push ( tempMapBorder ) ;
124+ } ;
125+ tcl . push ( tempMapBorder ) ;
126+ }
127+ else {
128+ var tempMapBorder = {
129+ "type" : "Feature" ,
130+ "properties" : {
131+ "popupContent" : getPopupHTML ( v . extra ) ,
132+ "style" : {
133+ stroke : true ,
134+ weight : 1 ,
135+ color : "white" ,
136+ opacity : calculatedOpacity ,
137+ fillColor : calculateBrightness ( v . extra . budget , maxBudget ) ,
138+ fillOpacity : fOpacity
139+ }
140+ } ,
141+ "geometry" : {
142+ "type" : v . geometry . type ,
143+ "coordinates" : v . geometry . coordinates
144+ }
145+ } ;
146+ countryList . push ( tempMapBorder ) ;
147+ }
126148 } ) ;
127149 var info = L . control ( ) ;
128150
@@ -234,14 +256,33 @@ $(document).ready(function () {
234256 return L . circleMarker ( latlng , {
235257 radius : 6 ,
236258 fillColor : "red" ,
237- color : "black " ,
259+ color : "white " ,
238260 weight : 1 ,
239261 opacity : 1 ,
240262 fillOpacity : 0.3
241263 } ) ;
242264 }
243265 } ) . addTo ( map ) ;
244266
267+ L . geoJSON ( tcl , {
268+ style : function ( feature ) {
269+ return feature . properties && feature . properties . style ;
270+ } ,
271+
272+ onEachFeature : onEachFeature ,
273+
274+ pointToLayer : function ( feature , latlng ) {
275+ return L . circleMarker ( latlng , {
276+ radius : 6 ,
277+ fillColor : "red" ,
278+ color : "green" ,
279+ weight : 0 ,
280+ opacity : 0 ,
281+ fillOpacity : 0
282+ } ) ;
283+ }
284+ } ) . addTo ( map ) ;
285+
245286 //Draw each of the markers based on the API data and add them to the main leaflet map
246287 var markers = L . markerClusterGroup ( { chunkedLoading : true } ) ;
247288 $ . each ( mapMarkers , function ( index , marker ) {
0 commit comments