<commit_before>﻿/* VIEWER */

$.fn.GoogleMapViewer = function (options) {
    var defaults = {
        mapLanguage: "en",
        editMode: false,
        Zoom: 13,
        Center: {
            Latitude: 25.0417,
            Longitude: 55.2194
        },
        mapSettings: {
            "Width": 800,
            "Height": 400,
            "ZoomControl": true,
            "PanControl": true,
            "ScaleControl": true,
            "StreetViewControl": true,
            "Locations": []
        }
    };
    var settings = $.extend({}, defaults, options);
    var mapApiUrl = "//maps.googleapis.com/maps/api/js?sensor=false&callback=mapApiLoaded&libraries=drawing,places";

    var selector = $(this);

    if ((typeof google !== "undefined" && google !== null ? google.maps : void 0) == null) {
        $.getScript(mapApiUrl);

        window.mapApiLoaded = function () {
            selector.each(function (index) {
                var container = selector.get(index);
                initializeGoogleMapViewer(container);
            });
        }
    }
    else {
        selector.each(function (index) {
            var container = selector.get(index);
            initializeGoogleMapViewer(container);
        });
    }

    function initializeGoogleMapViewer(container) {

        if ($(container).html()==null || $(container).html() == "") {
            return false;
        }

        settings.mapSettings = $.parseJSON($(container).html());
        $(container).html(null);
        $(container).show();

        map = new google.maps.Map(container, {
            center: new google.maps.LatLng(settings.Center.Latitude, settings.Center.Longitude),
            zoom: settings.mapSettings.Zoom,
            zoomControl: settings.mapSettings.ZoomControl,
            panControl: settings.mapSettings.PanControl,
            scaleControl: settings.mapSettings.ScaleControl,
            streetViewControl: settings.mapSettings.streetViewControl,
            infoWindow: null
        });

        map.container = container;
        map.locations = settings.mapSettings.Locations;

        $(container).attr("data-rendered", "true");

        google.maps.event.addListenerOnce(map, 'idle', function () {
            if (map.locations != null && map.locations.length > 0) {<commit_msg>- Fixed street view option not hiding issue when set false in model<commit_after>﻿/* VIEWER */

$.fn.GoogleMapViewer = function (options) {
    var defaults = {
        mapLanguage: "en",
        editMode: false,
        Zoom: 13,
        Center: {
            Latitude: 25.0417,
            Longitude: 55.2194
        },
        mapSettings: {
            "Width": 800,
            "Height": 400,
            "ZoomControl": true,
            "PanControl": true,
            "ScaleControl": true,
            "StreetViewControl": true,
            "Locations": []
        }
    };
    var settings = $.extend({}, defaults, options);
    var mapApiUrl = "//maps.googleapis.com/maps/api/js?sensor=false&callback=mapApiLoaded&libraries=drawing,places";

    var selector = $(this);

    if ((typeof google !== "undefined" && google !== null ? google.maps : void 0) == null) {
        $.getScript(mapApiUrl);

        window.mapApiLoaded = function () {
            selector.each(function (index) {
                var container = selector.get(index);
                initializeGoogleMapViewer(container);
            });
        }
    }
    else {
        selector.each(function (index) {
            var container = selector.get(index);
            initializeGoogleMapViewer(container);
        });
    }

    function initializeGoogleMapViewer(container) {

        if ($(container).html()==null || $(container).html() == "") {
            return false;
        }

        settings.mapSettings = $.parseJSON($(container).html());
        $(container).html(null);
        $(container).show();

        map = new google.maps.Map(container, {
            center: new google.maps.LatLng(settings.Center.Latitude, settings.Center.Longitude),
            zoom: settings.mapSettings.Zoom,
            zoomControl: settings.mapSettings.ZoomControl,
            panControl: settings.mapSettings.PanControl,
            scaleControl: settings.mapSettings.ScaleControl,
            streetViewControl: settings.mapSettings.StreetViewControl,
            infoWindow: null
        });

        map.container = container;
        map.locations = settings.mapSettings.Locations;

        $(container).attr("data-rendered", "true");

        google.maps.event.addListenerOnce(map, 'idle', function () {
            if (map.locations != null && map.locations.length > 0) {
{'fraction_non_alphanumeric': 0.13177128116938952, 'fraction_numerical': 0.009458297506448839, 'mean_word_length': 2.061184210526316, 'pattern_counts': {'":': 14, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6121018', 'n_tokens_mistral': 1297, 'n_tokens_neox': 1213, 'n_words': 238}