document.write(''); const script = document.createElement('script'); script.src = 'https://static.anmeldungs-service.de/js/karte-einzeln.js?7'; document.head.appendChild(script); script.addEventListener("load", function() { am4core.ready(function() { // Themes begin //am4core.useTheme(am4themes); // Themes end // Create map instance var chart = am4core.create("chartdiv", am4maps.MapChart); // Set map definition chart.geodata = am4geodata_germanyHigh; // Set projection chart.projection = new am4maps.projections.Projection(); // Create map polygon series var polygonSeries = chart.series.push(new am4maps.MapPolygonSeries()); //Set min/max fill color for each area polygonSeries.heatRules.push({ property: "fill", target: polygonSeries.mapPolygons.template, min: am4core.color("#dd3333").brighten(1), max: am4core.color("#dd3333").brighten(-0.3) }); // Make map load polygon data (state shapes and names) from GeoJSON polygonSeries.useGeodata = true; // Set heatmap values for each state polygonSeries.data = [ { id: "DE", value: 555, name: "Deutschland" }, { id: "US", value: 7, name: "Vereinigte Staaten (USA)" }, { id: "CZ", value: 3, name: "Tschechische Republik" }, { id: "CH", value: 2, name: "Schweiz" }, { id: "NL", value: 1, name: "Niederlande" }, { id: "IM", value: 1, name: "Insel Man (Großbritannien)" }, { id: "GR", value: 1, name: "Griechenland" }, { id: "AE", value: 1, name: "Vereinigte Arabische Emirate" }, { id: "FR", value: 1, name: "Frankreich" }, { id: "BE", value: 1, name: "Belgien" }, ]; // Set up heat legend let heatLegend = chart.createChild(am4maps.HeatLegend); heatLegend.series = polygonSeries; heatLegend.align = "right"; heatLegend.valign = "bottom"; heatLegend.width = am4core.percent(20); heatLegend.marginRight = am4core.percent(4); heatLegend.minValue = 0; heatLegend.maxValue = 40000; // Blank out internal heat legend value axis labels heatLegend.valueAxis.renderer.labels.template.adapter.add("text", function(labelText) { return ""; }); // Configure series tooltip var polygonTemplate = polygonSeries.mapPolygons.template; polygonTemplate.tooltipText = "{name}: {value}"; polygonTemplate.nonScalingStroke = true; polygonTemplate.strokeWidth = 0.5; // Create hover state and set alternative fill color var hs = polygonTemplate.states.create("hover"); hs.properties.fill = am4core.color("#dd3333"); }); // end am4core.ready() }); document.write('
');