Grouped countries map

Developer
Size
2,625 Kb
Views
8,096

How do I make an grouped countries map?

You can group countries of the map into groups, fill them with the same color add mouse interaction for the whole group. The map can automatically detect the bounds of the group and zoom-in to it.. What is a grouped countries map? How do you make a grouped countries map? This script and codes were developed by Otto Garcia on 02 December 2022, Friday.

Grouped countries map Previews

Grouped countries map - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Grouped countries map</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <script src="https://www.amcharts.com/lib/3/ammap.js"></script>
<script src="https://www.amcharts.com/lib/3/maps/js/worldHigh.js"></script>
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
<div id="chartdiv"></div> <script src='https://code.jquery.com/jquery-1.11.2.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Grouped countries map - Script Codes CSS Codes

#chartdiv { width: 100%; height: 500px;
}

Grouped countries map - Script Codes JS Codes

var map = AmCharts.makeChart( "chartdiv", { "type": "map", "theme": "light", "dataProvider": { "map": "worldHigh", "zoomLevel": 3.5, "zoomLongitude": 10, "zoomLatitude": 52, "areas": [ { "title": "Austria", "id": "AT", "color": "#67b7dc", "customData": "1995", "groupId": "before2004" }, { "title": "Ireland", "id": "IE", "color": "#67b7dc", "customData": "1973", "groupId": "before2004" }, { "title": "Denmark", "id": "DK", "color": "#67b7dc", "customData": "1973", "groupId": "before2004" }, { "title": "Finland", "id": "FI", "color": "#67b7dc", "customData": "1995", "groupId": "before2004" }, { "title": "Sweden", "id": "SE", "color": "#67b7dc", "customData": "1995", "groupId": "before2004" }, { "title": "Great Britain", "id": "GB", "color": "#67b7dc", "customData": "1973", "groupId": "before2004" }, { "title": "Italy", "id": "IT", "color": "#67b7dc", "customData": "1957", "groupId": "before2004" }, { "title": "France", "id": "FR", "color": "#67b7dc", "customData": "1957", "groupId": "before2004" }, { "title": "Spain", "id": "ES", "color": "#67b7dc", "customData": "1986", "groupId": "before2004" }, { "title": "Greece", "id": "GR", "color": "#67b7dc", "customData": "1981", "groupId": "before2004" }, { "title": "Germany", "id": "DE", "color": "#67b7dc", "customData": "1957", "groupId": "before2004" }, { "title": "Belgium", "id": "BE", "color": "#67b7dc", "customData": "1957", "groupId": "before2004" }, { "title": "Luxembourg", "id": "LU", "color": "#67b7dc", "customData": "1957", "groupId": "before2004" }, { "title": "Netherlands", "id": "NL", "color": "#67b7dc", "customData": "1957", "groupId": "before2004" }, { "title": "Portugal", "id": "PT", "color": "#67b7dc", "customData": "1986", "groupId": "before2004" }, { "title": "Lithuania", "id": "LT", "color": "#ebdb8b", "customData": "2004", "groupId": "2004" }, { "title": "Latvia", "id": "LV", "color": "#ebdb8b", "customData": "2004", "groupId": "2004" }, { "title": "Czech Republic ", "id": "CZ", "color": "#ebdb8b", "customData": "2004", "groupId": "2004" }, { "title": "Slovakia", "id": "SK", "color": "#ebdb8b", "customData": "2004", "groupId": "2004" }, { "title": "Slovenia", "id": "SI", "color": "#ebdb8b", "customData": "2004", "groupId": "2004" }, { "title": "Estonia", "id": "EE", "color": "#ebdb8b", "customData": "2004", "groupId": "2004" }, { "title": "Hungary", "id": "HU", "color": "#ebdb8b", "customData": "2004", "groupId": "2004" }, { "title": "Cyprus", "id": "CY", "color": "#ebdb8b", "customData": "2004", "groupId": "2004" }, { "title": "Malta", "id": "MT", "color": "#ebdb8b", "customData": "2004", "groupId": "2004" }, { "title": "Poland", "id": "PL", "color": "#ebdb8b", "customData": "2004", "groupId": "2004" }, { "title": "Romania", "id": "RO", "color": "#83c2ba", "customData": "2007", "groupId": "2007" }, { "title": "Bulgaria", "id": "BG", "color": "#83c2ba", "customData": "2007", "groupId": "2007" }, { "title": "Croatia", "id": "HR", "color": "#db8383", "customData": "2013", "groupId": "2013" } ] }, "areasSettings": { "rollOverOutlineColor": "#FFFFFF", "rollOverColor": "#CC0000", "alpha": 0.8, "unlistedAreasAlpha": 0.1, "balloonText": "[[title]] joined EU at [[customData]]" }, "legend": { "width": "100%", "marginRight": 27, "marginLeft": 27, "equalWidths": false, "backgroundAlpha": 0.5, "backgroundColor": "#FFFFFF", "borderColor": "#ffffff", "borderAlpha": 1, "top": 450, "left": 0, "horizontalGap": 10, "data": [ { "title": "EU member before 2004", "color": "#67b7dc" }, { "title": "Joined at 2004", "color": "#ebdb8b" }, { "title": "Joined at 2007", "color": "#83c2ba" }, { "title": "Joined at 2013", "color": "#db8383" } ] }, "export": { "enabled": true }
} );
Grouped countries map - Script Codes
Grouped countries map - Script Codes
Home Page Home
Developer Otto Garcia
Username good886
Uploaded December 02, 2022
Rating 3
Size 2,625 Kb
Views 8,096
Do you need developer help for Grouped countries map?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Otto Garcia (good886) Script Codes
Create amazing sales emails with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!