Home » Jquery » JQuery Vector Map stopped working after I installed SSL Certificate. Why?-Exceptionshub

JQuery Vector Map stopped working after I installed SSL Certificate. Why?-Exceptionshub

Posted by: admin February 24, 2020 Leave a comment

Questions:

Following is the code for Vector World Map in index.html:

<div class="card">
    <div class="card-header">
        <h4>World Traffic Frequency</h4>
    </div>
    <div class="Vector-map-js">
        <div id="vmap" class="vmap" style="height: 500px;"></div>
    </div>
</div>

And I am using the following code in analytics.js to set the data:

jQuery('#vmap').vectorMap({
        map: 'world_en',
        backgroundColor: null,
        color: '#ffffff',
        hoverOpacity: 0.7,
        selectedColor: '#1de9b6',
        enableZoom: true,
        showTooltip: true,
        values: map_data,
        scaleColors: ['#1de9b6', '#03a9f5'],
        normalizeFunction: 'polynomial'
    });

where

var map_data = {"us": "778","nl": "1","in": "230","ie": "1","ca": "60","gb": "39","de": "73",......};

and I am not using http to get the resources, so I cant locate where it is going wrong.

<script defer src="js/jquery.vmap.min.js"></script>
<script defer src="js/jquery.vmap.sampledata.js"></script>
<script defer src="js/jquery.vmap.world.js"></script>

The map was working well, just before I installed the SSL certificate. Removing SSL makes the map work. There is no problem with displaying any other statistics on the page.

How to&Answer: