* ---------------------------------------
* This demo was created using amCharts 4.
* For more information visit:
* https://www.amcharts.com/
* Documentation is available at:
* https://www.amcharts.com/docs/v4/
* ---------------------------------------
var chart = am4core.create("chartdiv", am4maps.MapChart);
chart.geodata = am4geodata_worldLow;
chart.projection = new am4maps.projections.Miller();
// Create map polygon series
var polygonSeries = chart.series.push(new am4maps.MapPolygonSeries());
// Make map load polygon (like country names) data from GeoJSON
polygonSeries.useGeodata = true;
var polygonTemplate = polygonSeries.mapPolygons.template;
polygonTemplate.tooltipText = "{name}";
polygonTemplate.fill = am4core.color("#74B266");
polygonSeries.exclude = ["AQ"];
var imageSeries = chart.series.push(new am4maps.MapImageSeries());
// Create a circle image in image series template so it gets replicated to all new images
var imageSeriesTemplate = imageSeries.mapImages.template;
var circle = imageSeriesTemplate.createChild(am4core.Circle);
circle.fill = am4core.color("#e03e96");
circle.stroke = am4core.color("#FFFFFF");
circle.nonScaling = true;
circle.tooltipText = "{title}";
imageSeriesTemplate.propertyFields.latitude = "latitude";
imageSeriesTemplate.propertyFields.longitude = "longitude";
// Add data for the three cities
var lineSeries = chart.series.push(new am4maps.MapLineSeries());
lineSeries.mapLines.template.stroke = am4core.color("#e03e96");
lineSeries.mapLines.template.line.strokeWidth = 4;
lineSeries.mapLines.template.line.nonScalingStroke = true;
lineSeries.mapLines.template.line.strokeDasharray = "5 3";
lineSeries.mapLines.template.line.adapter.add("strokeWidth", function (strokeWidth, target) {
target.strokeDasharray = 5 / chart.zoomLevel + " " + 3 / chart.zoomLevel;
{ latitude: 48.856614, longitude: 2.352222 },
{ latitude: 40.712775, longitude: -74.005973 },
{ latitude: 49.282729, longitude: -123.120738 }