          marker.setMap(map);
            });
            if (markersData.length > 1) {
                var pathCoordinates = [];
                markersData.filter(item => item.icon !== 'place').forEach(function(item) { 
                    pathCoordinates.push(new AMap.LngLat(item.position[0], item.position[1]));
                });
                if (pathCoordinates.length > 1) { 
                    var polyline = new AMap.Polyline({
                        path: pathCoordinates, strokeColor: 