This is my hotspot.json file that I want to import inside a jquery function. The issue i struggle with are the quotation marks on the hotspot value. Without them the json file is not valid but now it is not working.
[
{
"pitch": 14.1,
"yaw": 1.5,
"cssClass": "custom-hotspot",
"createTooltipFunc": hotspot,
"createTooltipArgs": "Baltimore Museum of Art"
},
{
"pitch": -9.4,
"yaw": 222.6,
"cssClass": "custom-hotspot",
"createTooltipFunc": hotspot,
"createTooltipArgs": "Art Museum Drive"
},
{
"pitch": -0.9,
"yaw": 144.4,
"cssClass": "custom-hotspot",
"createTooltipFunc": hotspot,
"createTooltipArgs": "North Charles Street"
}
]
This is how i import the json file at this moment.
var hotspots = (function() {
$.ajax({
'async': false,
'global': false,
'url': "/hotspot.json",
'dataType': "json",
'success': function (data) {
hotspots = data;
}
});
return hotspots;
})();
At this point i don't know where to start. Do i need to change something in my json file or fix the problem in the js file? Can someone help me to tackle this problem?