- Data Central
- 2020 Decennial Census
Select an Area
2020 Decennial Census
Detail
Diversity Index *
2020 | 2010 | Change |
---|---|---|
26 | 15 | 11 |
* The USA TODAY diversity index shows on a scale of 0 to 100 how likely it is two people from an area would have a different race or ethnicity. A score of 0 would mean everyone had the same race and ethnicity; a score of 100 would mean everyone in an area had a distinctly different combination of race and ethnicity. Nearly everywhere is some place in the middle. The index was invented in 1991 by Phil Meyer of the University of North Carolina and Shawn McIntosh, who was then with USA TODAY. This score differs from the Census Bureau's version of the diversity index because of differences in how the bureau's formula counts race and Hispanic origin.
Population by Race/Ethnicity
2020 | 2010 | Change | ||||
---|---|---|---|---|---|---|
# | % | # | % | |||
Total | 43,127 | 44,151 | -2.3% | |||
Race | White | 38,618 | 89.5% | 41,964 | 95.0% | -8.0% |
Black | 930 | 2.2% | 578 | 1.3% | 60.9% | |
American Indian | 143 | 0.3% | 91 | 0.2% | 57.1% | |
Asian | 535 | 1.2% | 377 | 0.9% | 41.9% | |
Pacific Islander | 137 | 0.3% | 9 | 0.0% | 1422.2% | |
Other | 624 | 1.4% | 416 | 0.9% | 50.0% | |
Two or More | 2,140 | 5.0% | 716 | 1.6% | 198.9% | |
Ethnicity | Hispanic or Latino | 2,243 | 5.2% | 1,694 | 3.8% | 32.4% |
Population by Race/Ethnicity: 18 Years and Over
2020 | 2010 | Change | ||||
---|---|---|---|---|---|---|
# | % | # | % | |||
Total | 34,430 | 34,660 | -0.7% | |||
Race | White | 31,467 | 91.4% | 33,381 | 96.3% | -5.7% |
Black | 595 | 1.7% | 353 | 1.0% | 68.6% | |
American Indian | 105 | 0.3% | 64 | 0.2% | 64.1% | |
Asian | 434 | 1.3% | 271 | 0.8% | 60.1% | |
Pacific Islander | 89 | 0.3% | 8 | 0.0% | 1012.5% | |
Other | 466 | 1.4% | 293 | 0.8% | 59.0% | |
Two or More | 1,274 | 3.7% | 290 | 0.8% | 339.3% | |
Ethnicity | Hispanic or Latino | 1,451 | 4.2% | 1,021 | 2.9% | 42.1% |
Diversity Index *
2020 | 2010 | Change |
---|---|---|
26 | 15 | 11 |
* The USA TODAY diversity index shows on a scale of 0 to 100 how likely it is two people from an area would have a different race or ethnicity. A score of 0 would mean everyone had the same race and ethnicity; a score of 100 would mean everyone in an area had a distinctly different combination of race and ethnicity. Nearly everywhere is some place in the middle. The index was invented in 1991 by Phil Meyer of the University of North Carolina and Shawn McIntosh, who was then with USA TODAY. This score differs from the Census Bureau's version of the diversity index because of differences in how the bureau's formula counts race and Hispanic origin.
Housing Units
2020 | 2010 | Change | |||
---|---|---|---|---|---|
# | % | # | % | ||
Total Housing Units | 22,603 | 22,163 | 2.0% | ||
Occupied | 19,224 | 85.1% | 19,350 | 87.3% | -0.7% |
Vacant | 3,379 | 14.9% | 2,813 | 12.7% | 20.1% |
Population in Group Quarters
2020 | |
---|---|
Total Population in Group Quarters | 1,007 |
Institutionalized Population | 616 |
Correctional Facilities for Adults | 86 |
Juvenile Facilities | 12 |
Nursing Facilities/Skilled-nursing Facilities | 499 |
Other Institutional Facilities | 19 |
Noninstitutionalized Population | 391 |
College/University Student Housing | 286 |
Military Quarters | 0 |
Other Noninstitutional Facilities | 105 |
Map
Total Population Change
Less than -3%
-3% to 0%
0% to 3%
3% to 6%
6% to 9%
9% to 12%
12% to 15%
15% to 18%
More than 18%
N/A
1:500,000 scale
Other Areas in Cerro Gordo County, Iowa
Total Population | Age 18 and Over | ||||||
Total Population | Age 18 and Over | ||||||
Area | Diversity Index | Total Population | Hispanic | Not Hispanic, White | Total Population | Hispanic | Not Hispanic, White |
---|---|---|---|---|---|---|---|
010 United States | 67 12 | 331,449,281 7.4% | 62,080,044 18.7% 23.0% | 191,697,647 57.8% -2.6% | 258,343,281 8.8% | 43,322,792 16.8% 19.9% | 157,118,573 60.8% 0.0% |
040-19 Iowa | 34 12 | 3,190,369 4.7% | 215,986 6.8% 42.5% | 2,638,201 82.7% -2.3% | 2,450,103 5.7% | 134,104 5.5% 52.0% | 2,093,769 85.5% -0.7% |
050-19033 Cerro Gordo County, Iowa | 26 11 | 43,127 -2.3% | 2,243 5.2% 32.4% | 37,819 87.7% -7.5% | 34,430 -0.7% | 1,451 4.2% 42.1% | 30,974 90.0% -5.4% |
140-19033950102 Census Tract 9501.02, Cerro Gordo County, Iowa | 37 13 | 4,374 -6.7% | 379 8.7% 19.9% | 3,553 81.2% -13.6% | 3,367 -2.5% | 248 7.4% 42.5% | 2,840 84.3% -9.8% |
140-19033950201 Census Tract 9502.01, Cerro Gordo County, Iowa | 32 13 | 2,737 0.3% | 221 8.1% 63.7% | 2,295 83.9% -6.6% | 2,295 6.3% | 143 6.2% 93.2% | 2,005 87.4% 0.6% |
140-19033950202 Census Tract 9502.02, Cerro Gordo County, Iowa | 32 13 | 3,664 0.2% | 216 5.9% 21.3% | 3,102 84.7% -6.1% | 2,929 0.9% | 121 4.1% 4.3% | 2,598 88.7% -3.4% |
140-19033950300 Census Tract 9503, Cerro Gordo County, Iowa | 38 17 | 4,422 -7.3% | 391 8.8% 34.8% | 3,614 81.7% -15.2% | 3,534 -7.3% | 242 6.8% 27.4% | 3,007 85.1% -13.8% |
140-19033950402 Census Tract 9504.02, Cerro Gordo County, Iowa | 27 11 | 4,146 0.4% | 244 5.9% 30.5% | 3,578 86.3% -5.7% | 3,381 3.2% | 161 4.8% 34.2% | 3,010 89.0% -1.9% |
140-19033950600 Census Tract 9506, Cerro Gordo County, Iowa | 12 6 | 2,145 -1.6% | 39 1.8% 39.3% | 2,029 94.6% -3.9% | 1,702 -3.3% | 23 1.4% 15.0% | 1,624 95.4% -5.7% |
140-19033950700 Census Tract 9507, Cerro Gordo County, Iowa | 20 11 | 4,030 -0.4% | 146 3.6% 82.5% | 3,666 91.0% -5.0% | 3,262 2.6% | 103 3.2% 102.0% | 3,034 93.0% -1.1% |
140-19033950800 Census Tract 9508, Cerro Gordo County, Iowa | 16 5 | 4,785 -4.1% | 112 2.3% 0.9% | 4,443 92.9% -5.7% | 3,873 -2.9% | 76 2.0% 31.0% | 3,640 94.0% -5.5% |
140-19033950900 Census Tract 9509, Cerro Gordo County, Iowa | 13 8 | 1,659 4.9% | 35 2.1% 150.0% | 1,562 94.2% 1.5% | 1,382 7.5% | 18 1.3% 100.0% | 1,324 95.8% 4.7% |
140-19033951000 Census Tract 9510, Cerro Gordo County, Iowa | 13 8 | 2,763 -3.5% | 81 2.9% 107.7% | 2,599 94.1% -7.0% | 2,084 -5.4% | 41 2.0% 127.8% | 1,982 95.1% -8.5% |
140-19033951400 Census Tract 9514, Cerro Gordo County, Iowa | 22 10 | 3,900 3.3% | 141 3.6% 43.9% | 3,457 88.6% -2.6% | 3,099 6.6% | 113 3.6% 71.2% | 2,768 89.3% 0.7% |
140-19033951600 Census Tract 9516, Cerro Gordo County, Iowa | 26 11 | 4,502 -5.1% | 238 5.3% 9.2% | 3,921 87.1% -10.4% | 3,522 -5.7% | 162 4.6% 29.6% | 3,142 89.2% -10.8% |
Status of sex offenders in Florida
Source: U.S. Census Bureau
* Because tract and legislative district boundaries have changed in some cases, USA TODAY estimated 2020 tract and legislative district population counts based on their new boundaries for consistency.
Total Population Change
'+feature.properties.total_ypc+'%
'; popupContent += '
More
'; return popupContent;}// thisgeo = 2020-050-19033function Gon2Line(val){ if (val['type'] == 'Polygon') { return {"type":"FeatureCollection", "features":[{"type":"Feature", "geometry":{ type: "LineString", coordinates: val['coordinates'][0]}, "properties":{}} ]}; } else { var rd = {"type":"FeatureCollection", "features":[]}; for (let i = 0; i < val['coordinates'].length; i++){ rd["features"].push({"type":"Feature", "id":i, "geometry":{ type: "MultiLineString", coordinates: val['coordinates'][i]}, "properties":{"id":i}}) } return rd; }}mapboxgl.accessToken = 'pk.eyJ1IjoieXB5dW4iLCJhIjoiY2oxcW4ybWhxMDBkMjJxcGVhbDV5cnpzYyJ9.oFQSnOc57xCR7A51OR6-3w';var map = new mapboxgl.Map({ container: 'uscntymap', // container id style: 'mapbox://styles/ypyun/cj83a8ga5abkq2sqpivw3nrzg', //'mapbox://styles/mapbox/streets-v11', // stylesheet location center: [-93.6037, 41.5911], // starting position [lng, lat] zoom: 9, // starting zoom attributionControl: false,});map.addControl(new mapboxgl.AttributionControl({ compact: false, customAttribution:[] }));var stopvar = [[-3,'#FF0014'],[0,'#FF3C14'],[3,'#FF7814'],[6,'#FFB414'],[9,'#C5ED11'],[12,'#8BEB0E'],[15,'#51E80B'],[18,'#18E609'] ];//var G2020_010 = [[[[-125.0011, 24.9493],[-66.9326, 49.5904]]]];var sJSON = {"type":"FeatureCollection", "features":[ {"type":"Feature","geometry": G2020_140_19033950102,"properties":{ "geot__geoid":"19033950102","geot__namelsad":"Census Tract 9501.02, Cerro Gordo County, Iowa","geot__sumlevel":"140","geop__pmk":"2010-140-19033950102","geot__pmk":"2020-140-19033950102","pmk":"140-19033950102","total_ypc":-6.7, } }, {"type":"Feature","geometry": G2020_140_19033950201,"properties":{ "geot__geoid":"19033950201","geot__namelsad":"Census Tract 9502.01, Cerro Gordo County, Iowa","geot__sumlevel":"140","geop__pmk":"null","geot__pmk":"2020-140-19033950201","pmk":"140-19033950201","total_ypc":0.3, } }, {"type":"Feature","geometry": G2020_140_19033950202,"properties":{ "geot__geoid":"19033950202","geot__namelsad":"Census Tract 9502.02, Cerro Gordo County, Iowa","geot__sumlevel":"140","geop__pmk":"null","geot__pmk":"2020-140-19033950202","pmk":"140-19033950202","total_ypc":0.2, } }, {"type":"Feature","geometry": G2020_140_19033950300,"properties":{ "geot__geoid":"19033950300","geot__namelsad":"Census Tract 9503, Cerro Gordo County, Iowa","geot__sumlevel":"140","geop__pmk":"2010-140-19033950300","geot__pmk":"2020-140-19033950300","pmk":"140-19033950300","total_ypc":-7.3, } }, {"type":"Feature","geometry": G2020_140_19033950402,"properties":{ "geot__geoid":"19033950402","geot__namelsad":"Census Tract 9504.02, Cerro Gordo County, Iowa","geot__sumlevel":"140","geop__pmk":"2010-140-19033950402","geot__pmk":"2020-140-19033950402","pmk":"140-19033950402","total_ypc":0.4, } }, {"type":"Feature","geometry": G2020_140_19033950600,"properties":{ "geot__geoid":"19033950600","geot__namelsad":"Census Tract 9506, Cerro Gordo County, Iowa","geot__sumlevel":"140","geop__pmk":"2010-140-19033950600","geot__pmk":"2020-140-19033950600","pmk":"140-19033950600","total_ypc":-1.6, } }, {"type":"Feature","geometry": G2020_140_19033950700,"properties":{ "geot__geoid":"19033950700","geot__namelsad":"Census Tract 9507, Cerro Gordo County, Iowa","geot__sumlevel":"140","geop__pmk":"2010-140-19033950700","geot__pmk":"2020-140-19033950700","pmk":"140-19033950700","total_ypc":-0.4, } }, {"type":"Feature","geometry": G2020_140_19033950800,"properties":{ "geot__geoid":"19033950800","geot__namelsad":"Census Tract 9508, Cerro Gordo County, Iowa","geot__sumlevel":"140","geop__pmk":"2010-140-19033950800","geot__pmk":"2020-140-19033950800","pmk":"140-19033950800","total_ypc":-4.1, } }, {"type":"Feature","geometry": G2020_140_19033950900,"properties":{ "geot__geoid":"19033950900","geot__namelsad":"Census Tract 9509, Cerro Gordo County, Iowa","geot__sumlevel":"140","geop__pmk":"2010-140-19033950900","geot__pmk":"2020-140-19033950900","pmk":"140-19033950900","total_ypc":4.9, } }, {"type":"Feature","geometry": G2020_140_19033951000,"properties":{ "geot__geoid":"19033951000","geot__namelsad":"Census Tract 9510, Cerro Gordo County, Iowa","geot__sumlevel":"140","geop__pmk":"2010-140-19033951000","geot__pmk":"2020-140-19033951000","pmk":"140-19033951000","total_ypc":-3.5, } }, {"type":"Feature","geometry": G2020_140_19033951400,"properties":{ "geot__geoid":"19033951400","geot__namelsad":"Census Tract 9514, Cerro Gordo County, Iowa","geot__sumlevel":"140","geop__pmk":"2010-140-19033951400","geot__pmk":"2020-140-19033951400","pmk":"140-19033951400","total_ypc":3.3, } }, {"type":"Feature","geometry": G2020_140_19033951600,"properties":{ "geot__geoid":"19033951600","geot__namelsad":"Census Tract 9516, Cerro Gordo County, Iowa","geot__sumlevel":"140","geop__pmk":"2010-140-19033951600","geot__pmk":"2020-140-19033951600","pmk":"140-19033951600","total_ypc":-5.1, } }, ]};var pJSON = {"type":"FeatureCollection", "features":[ {"type":"Feature","geometry": G2020_060_1903390135,"properties":{ "geot__geoid":"1903390135","geot__namelsad":"Bath township, Cerro Gordo County, Iowa","geot__sumlevel":"060","geop__pmk":"2010-060-1903390135","geot__pmk":"2020-060-1903390135","pmk":"060-1903390135","total_ypc":-2.5, } }, {"type":"Feature","geometry": G2020_060_1903390720,"properties":{ "geot__geoid":"1903390720","geot__namelsad":"Clear Lake city, Cerro Gordo County, Iowa","geot__sumlevel":"060","geop__pmk":"2010-060-1903390720","geot__pmk":"2020-060-1903390720","pmk":"060-1903390720","total_ypc":-1.2, } }, {"type":"Feature","geometry": G2020_060_1903390721,"properties":{ "geot__geoid":"1903390721","geot__namelsad":"Clear Lake township, Cerro Gordo County, Iowa","geot__sumlevel":"060","geop__pmk":"2010-060-1903390721","geot__pmk":"2020-060-1903390721","pmk":"060-1903390721","total_ypc":3.6, } }, {"type":"Feature","geometry": G2020_060_1903391017,"properties":{ "geot__geoid":"1903391017","geot__namelsad":"Dougherty township, Cerro Gordo County, Iowa","geot__sumlevel":"060","geop__pmk":"2010-060-1903391017","geot__pmk":"2020-060-1903391017","pmk":"060-1903391017","total_ypc":-4.8, } }, {"type":"Feature","geometry": G2020_060_1903391308,"properties":{ "geot__geoid":"1903391308","geot__namelsad":"Falls township, Cerro Gordo County, Iowa","geot__sumlevel":"060","geop__pmk":"2010-060-1903391308","geot__pmk":"2020-060-1903391308","pmk":"060-1903391308","total_ypc":-0.5, } }, {"type":"Feature","geometry": G2020_060_1903391551,"properties":{ "geot__geoid":"1903391551","geot__namelsad":"Geneseo township, Cerro Gordo County, Iowa","geot__sumlevel":"060","geop__pmk":"2010-060-1903391551","geot__pmk":"2020-060-1903391551","pmk":"060-1903391551","total_ypc":4.1, } }, {"type":"Feature","geometry": G2020_060_1903391641,"properties":{ "geot__geoid":"1903391641","geot__namelsad":"Grant township, Cerro Gordo County, Iowa","geot__sumlevel":"060","geop__pmk":"2010-060-1903391641","geot__pmk":"2020-060-1903391641","pmk":"060-1903391641","total_ypc":-12.4, } }, {"type":"Feature","geometry": G2020_060_1903391773,"properties":{ "geot__geoid":"1903391773","geot__namelsad":"Grimes township, Cerro Gordo County, Iowa","geot__sumlevel":"060","geop__pmk":"2010-060-1903391773","geot__pmk":"2020-060-1903391773","pmk":"060-1903391773","total_ypc":-9.5, } }, {"type":"Feature","geometry": G2020_060_1903392346,"properties":{ "geot__geoid":"1903392346","geot__namelsad":"Lake township, Cerro Gordo County, Iowa","geot__sumlevel":"060","geop__pmk":"2010-060-1903392346","geot__pmk":"2020-060-1903392346","pmk":"060-1903392346","total_ypc":-9.5, } }, {"type":"Feature","geometry": G2020_060_1903392508,"properties":{ "geot__geoid":"1903392508","geot__namelsad":"Lime Creek township, Cerro Gordo County, Iowa","geot__sumlevel":"060","geop__pmk":"2010-060-1903392508","geot__pmk":"2020-060-1903392508","pmk":"060-1903392508","total_ypc":-8.9, } }, {"type":"Feature","geometry": G2020_060_1903392538,"properties":{ "geot__geoid":"1903392538","geot__namelsad":"Lincoln township, Cerro Gordo County, Iowa","geot__sumlevel":"060","geop__pmk":"2010-060-1903392538","geot__pmk":"2020-060-1903392538","pmk":"060-1903392538","total_ypc":3.5, } }, {"type":"Feature","geometry": G2020_060_1903392886,"properties":{ "geot__geoid":"1903392886","geot__namelsad":"Mason township, Cerro Gordo County, Iowa","geot__sumlevel":"060","geop__pmk":"2010-060-1903392886","geot__pmk":"2020-060-1903392886","pmk":"060-1903392886","total_ypc":-2.0, } }, {"type":"Feature","geometry": G2020_060_1903392890,"properties":{ "geot__geoid":"1903392890","geot__namelsad":"Mason City city, Cerro Gordo County, Iowa","geot__sumlevel":"060","geop__pmk":"2010-060-1903392890","geot__pmk":"2020-060-1903392890","pmk":"060-1903392890","total_ypc":-2.6, } }, {"type":"Feature","geometry": G2020_060_1903393042,"properties":{ "geot__geoid":"1903393042","geot__namelsad":"Mount Vernon township, Cerro Gordo County, Iowa","geot__sumlevel":"060","geop__pmk":"2010-060-1903393042","geot__pmk":"2020-060-1903393042","pmk":"060-1903393042","total_ypc":-9.9, } }, {"type":"Feature","geometry": G2020_060_1903393246,"properties":{ "geot__geoid":"1903393246","geot__namelsad":"Owen township, Cerro Gordo County, Iowa","geot__sumlevel":"060","geop__pmk":"2010-060-1903393246","geot__pmk":"2020-060-1903393246","pmk":"060-1903393246","total_ypc":3.5, } }, {"type":"Feature","geometry": G2020_060_1903393408,"properties":{ "geot__geoid":"1903393408","geot__namelsad":"Pleasant Valley township, Cerro Gordo County, Iowa","geot__sumlevel":"060","geop__pmk":"2010-060-1903393408","geot__pmk":"2020-060-1903393408","pmk":"060-1903393408","total_ypc":-13.9, } }, {"type":"Feature","geometry": G2020_060_1903393456,"properties":{ "geot__geoid":"1903393456","geot__namelsad":"Portland township, Cerro Gordo County, Iowa","geot__sumlevel":"060","geop__pmk":"2010-060-1903393456","geot__pmk":"2020-060-1903393456","pmk":"060-1903393456","total_ypc":5.4, } }, {"type":"Feature","geometry": G2020_060_1903394188,"properties":{ "geot__geoid":"1903394188","geot__namelsad":"Union township, Cerro Gordo County, Iowa","geot__sumlevel":"060","geop__pmk":"2010-060-1903394188","geot__pmk":"2020-060-1903394188","pmk":"060-1903394188","total_ypc":-6.2, } }, ]};// aaaa map.on('load', function () { var layers = map.getStyle().layers; var firstSymbolId; for (var i = 0; i < layers.length; i++) { if (layers[i].type === 'symbol') { firstSymbolId = layers[i].id; break; } } //map.addSource("CensusSL",{ "type": "geojson", "data":'/media/jsons/census/d/010/010.json' }); "source": "CensusSL", /"filter": ["any",[">=", "total_ypc", 0]], map.addLayer({"id": "census_main_layer", "type": "fill", "source": { "type": "geojson", "data":sJSON }, 'layout': {'visibility': "visible"}, "paint": {'fill-color': {property: 'total_ypc', stops: stopvar},'fill-opacity':0.8, 'fill-outline-color': '#666666',}}, firstSymbolId); map.on('click', 'census_main_layer', function (e) {new mapboxgl.Popup({ offset: 14 }).setLngLat(e.lngLat).setHTML(onCensusAllFeature(e.features[0])).addTo(map);}); map.on('mouseenter', 'census_main_layer', function () {map.getCanvas().style.cursor = 'pointer';}); map.on('mouseleave', 'census_main_layer', function () {map.getCanvas().style.cursor = '';}); map.addLayer({"id": "census_cousub_layer", "type": "fill", "source": { "type": "geojson", "data":pJSON }, 'layout': {'visibility': "none"}, "paint": {'fill-color': {property: 'total_ypc', stops: stopvar},'fill-opacity':0.8, 'fill-outline-color': '#666666',}}, firstSymbolId); map.on('click', 'census_cousub_layer', function (e) {new mapboxgl.Popup({ offset: 14 }).setLngLat(e.lngLat).setHTML(onCensusAllFeature(e.features[0])).addTo(map);}); map.on('mouseenter', 'census_cousub_layer', function () {map.getCanvas().style.cursor = 'pointer';}); map.on('mouseleave', 'census_cousub_layer', function () {map.getCanvas().style.cursor = '';}); map.addLayer({'id': 'areaBoundary', 'type': 'line', 'source': { "type": "geojson", "data":Gon2Line(G2020_050_19033) }, 'layout': { 'line-join': 'round', 'line-cap': 'round' }, 'paint': { 'line-color': '#288499', 'line-width': 4 } }, firstSymbolId); }); var toggleableLayerIds = [['census_main_layer','Tract'],['census_cousub_layer','City/Town'] ]; for (var i = 0; i < toggleableLayerIds.length; i++) { var id = toggleableLayerIds[i][0]; if (id === 'census_main_layer'){ var otrid = 'census_cousub_layer';} else {var otrid = 'census_main_layer';} var idstr = toggleableLayerIds[i][1]; var link = document.createElement('a'); link.href = '#'; if(i == 0){link.className = 'active';}else{link.className = 'notactive';} link.tgid = id; link.oid = otrid; link.textContent = idstr; link.setAttribute("id",id+'_id') link.onclick = function (e) { var clickedLayer = this.tgid; var anotherLayer = this.oid; e.preventDefault(); e.stopPropagation(); var visibility = map.getLayoutProperty(clickedLayer, 'visibility'); $('.active').each(function() {$(this).removeClass().addClass( "notactive" ); });// $('#ue_county_id').removeClass().addClass( "notactive" );// $('#ue_state_id').removeClass().addClass( "notactive" ); this.className = 'active'; for (tli of toggleableLayerIds) {if(tli[0] != this.tgid){map.setLayoutProperty(tli[0], 'visibility', 'none')}} map.setLayoutProperty(clickedLayer, 'visibility', 'visible');// map.setLayoutProperty(anotherLayer, 'visibility', 'none'); }; var layers = document.getElementById('mapmenu'); layers.appendChild(link);}function getBoundary(ggs){ if (ggs['type'] == 'Polygon'){ return [ggs['coordinates']] } else { return ggs['coordinates'] }}var BounceLine = getBoundary(G2020_050_19033); var bounds = new mapboxgl.LngLatBounds();BounceLine.forEach(function(Tpolygon) { Tpolygon.forEach(function(Tline){ Tline.forEach(function(Tpoint){bounds.extend(Tpoint); }) }) });//plvb: dcg object (2020-050-19033)map.fitBounds(bounds, { padding: 120 });map.addControl(new mapboxgl.NavigationControl(), 'top-left');