/**
* Script for Bing Map
*/
const devMap = function () {
let mapStyle = {};
let mapFilter = "";
let locationData = {};
let clusterLayer = undefined;
let radius = 22;
let zoomOnClick = false;
let zoomClusterOnClick = true;
const communitiesList = '#communityList';
const selectClass = '#selectCommunity';
const optionTemplate = '';
let defaultLocations = {}
function loadData() {
loadJSON('maphttps://www.microsoft.com/json/locations.js?v=28-09-22', function (response) {
defaultLocations = response;
loadJSON('maphttps://www.microsoft.com/json/style.js', function (response) {
mapStyle = response;
loadJSON('maphttps://www.microsoft.com/json/pins.js?v=28-09-22', function (response) {
locationData = response;
for (let i = 0; i < locationData.length; i++) {
const loc = locationData[i];
if (typeof loc["position"].lat == "undefined") {
loc["position"] = {
"lat": defaultLocations[loc['position']['location']].lat || 0,
"lng": defaultLocations[loc['position']['location']].lng || 0
}
}
}
LoadTechSelector();
initMap();
});
});
});
}
window.initDevMap = function () {
loadData();
}
function LoadTechSelector() {
var availableOptions = GetTechnologies();
$('#selectTech').append('');
for (let i = 0; i < availableOptions.length; i++) {
$('#selectTech').append('');
}
$('#selectTech').select2({
minimumResultsForSearch: -1
});
$('#selectTech').on('change', function () {
mapFilter = $('#selectTech').val();
$(communitiesList).addClass('hide').hide();
GetMap();
});
}
function GetPinByType(type, text) {
if (typeof text == "undefined") {
text = '';
}
var svgTemplate = '';
if (type.toLowerCase() == "hybrid") {
svgTemplate = '