在“甜蜜警报”对话框上显示超棒的微调框

时间:2019-05-07 12:20:32

标签: font-awesome sweetalert

我正在一个应用程序上工作,当我单击“付款”按钮时,我有一个甜美的警告对话框显示给用户,我想在text属性旁边的甜美警告对话框中显示超棒的字体它在加载微调器上显示了超棒的代码:

甜警报代码

<script>
 var encodedPath = 'arsyH`t}IcCs]iA{S{@}\\SqMh@qb@pGuDvElTlFnBfBT_BqNdIyFuAsK{L~BgDaK';

function initMap() {
        var bufferTolerance = 0.0005;

var places = [
['Pin 6180',51.5492,-1.7774],
['Pin 6181',51.549,-1.7774],
['Pin 6182',51.5488,-1.7774],
['Pin 6183',51.5486,-1.7774],
['Pin 6184',51.5484,-1.7774],
['Pin 6185',51.5482,-1.7774],
['Pin 6186',51.548,-1.7774],
['Pin 6187',51.5478,-1.7774],
['Pin 6188',51.5476,-1.7774],
['Pin 6189',51.5474,-1.7774],
['Pin 6190',51.5472,-1.7774],
['Pin 6191',51.547,-1.7774],
['Pin 6192',51.5468,-1.7774],
['Pin 6193',51.5466,-1.7774],
['Pin 6194',51.5464,-1.7774],
['Pin 6195',51.5462,-1.7774],
['Pin 6196',51.546,-1.7774],
['Pin 6197',51.5458,-1.7774],
['Pin 6198',51.5456,-1.7774],
['Pin 6199',51.5454,-1.7774],
['Pin 6280',51.5492,-1.777],
['Pin 6281',51.549,-1.777],
['Pin 6282',51.5488,-1.777],
['Pin 6283',51.5486,-1.777],
['Pin 6284',51.5484,-1.777],
['Pin 6285',51.5482,-1.777],
['Pin 6286',51.548,-1.777],
['Pin 6287',51.5478,-1.777],
['Pin 6288',51.5476,-1.777],
['Pin 6289',51.5474,-1.777],
['Pin 6290',51.5472,-1.777],
['Pin 6291',51.547,-1.777],
['Pin 6292',51.5468,-1.777],
['Pin 6293',51.5466,-1.777],
['Pin 6294',51.5464,-1.777],
['Pin 6295',51.5462,-1.777],
['Pin 6296',51.546,-1.777],
['Pin 6297',51.5458,-1.777],
['Pin 6298',51.5456,-1.777],
['Pin 6299',51.5454,-1.777],
['Pin 6530',51.5492,-1.776],
['Pin 6531',51.549,-1.776],
['Pin 6532',51.5488,-1.776],
['Pin 6533',51.5486,-1.776],
['Pin 6534',51.5484,-1.776],
['Pin 6535',51.5482,-1.776],
['Pin 6536',51.548,-1.776],
['Pin 6537',51.5478,-1.776],
['Pin 6538',51.5476,-1.776],
['Pin 6539',51.5474,-1.776],
['Pin 6540',51.5472,-1.776],
['Pin 6541',51.547,-1.776],
['Pin 6542',51.5468,-1.776],
['Pin 6543',51.5466,-1.776],
['Pin 6544',51.5464,-1.776],
['Pin 6545',51.5462,-1.776],
['Pin 6546',51.546,-1.776],
['Pin 6547',51.5458,-1.776],
['Pin 6548',51.5456,-1.776],
['Pin 6549',51.5454,-1.776],
];

        var decodedPath = google.maps.geometry.encoding.decodePath(encodedPath);
        var mapDiv = document.getElementById('map');
        var map = new google.maps.Map(mapDiv, {
                    center: {lat: 51.551269, lng: -1.783406},
                zoom: 15,
            mapTypeId: 'roadmap', // satellite  hybrid  roadmap terrain
            minZoom: 6,
        });

        var activityPoly = new google.maps.Polyline({
            path: decodedPath,  
            strokeColor: "#FF0000",
            strokeWeight: 10,
        });

        activityPoly.setMap(map);

        for (var i = 0; i < places.length; i++) {
            var place = places[i];
            var markerPosition = new google.maps.LatLng(place [1], place [2]);

                if (google.maps.geometry.poly.isLocationOnEdge(markerPosition, activityPoly, bufferTolerance)) {

                    var marker = new google.maps.Marker({
                        position: markerPosition,
                        map: map,
                        title: place [0],
                        icon: 'http://maps.google.com/mapfiles/kml/shapes/capital_small.png',

                    });
                }
        }
    }
</script>

<div id="map" style="width:80%;height:80%;"></div>

<script async defer src='https://maps.googleapis.com/maps/api/js?key=AIzaSyDERRp_g8NbZuzYINr2ROAe3_vyGfASYMo&libraries=geometry&callback=initMap'>

1 个答案:

答案 0 :(得分:0)

您必须使用content选项而不是text并将其设置为某个documentation中所述的DOM节点。有关如何从HTML字符串创建DOM节点的信息,请参见this question