PageSourceSearch

https://euromenaconsulting.com/frontend/js/map.js

js euromenaconsulting.com collected 2026-10-08 20:56:01 UTC 5,348 bytes, 142 lines download raw bytes

1// Custom Maps
2
3jQuery(function($) {
4    // Asynchronously Load the map API 
5    var script = document.createElement('script');
6    script.src = "https://maps.googleapis.com/maps/api/js?key=AIzaSyBBWmuzra9J1f1PyeLLxEdjUy5gHzHQNyc&callback=initialize";
7    document.body.appendChild(script);
8});
9
10function initialize() {
11    var map;
12    var bounds = new google.maps.LatLngBounds();
13    var mapOptions = {
14        mapTypeId: 'roadmap'
15    };
16
17    // Display a map on the page
18    map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
19    map.setTilt(45);
20
21    // Multiple Markers
22    var markers = [
23        ['Tunisia', 33.8662065, 7.3175556],
24		['Morocco', 31.7858381, -9.3939904],
25		['Pakistan', 30.2920057, 64.8564704],
26		['Afghanistan', 33.8616364, 63.2128562],
27		['Oman', 21.3969321, 51.658231],
28		['UAE', 24.3523893, 52.8347334],
29		['Qatar', 25.3442901, 50.6573127],
30		['Kuwait', 29.3141004, 46.9752876],
31		['KSA', 24.0233697, 40.5809056],
32		['Iraq', 33.2053979, 41.4711483],
33		['Syria', 34.7988444, 36.7593397],
34		['Jordan', 31.2773666, 36.0015073],
35		['Lebanon', 33.8734299, 35.2869845],
36		['China', 34.4560272,86.0832198],
37		['Cote D’Ivore', 7.4662983, -7.7915253],
38		['Mali', 17.5342122, -8.4809862],
39		['Egypt', 26.8448374, 26.3843241],
40		['Libya', 26.2999355, 12.8373833],
41		['Kenya', 0.1599405, 35.6643822],
42		['Burkina Faso', 12.2435211, -3.7983589],
43		['South Africa', -34.2794902, 18.2580469],
44		['Democratic Republic of Congo', -4.0101652, 17.2342326],
45		['Gabon', -0.9175394, 9.2299657],
46		['Nigeria', 9.0324896, 6.433493],
47		['Cyprus', 35.1686323, 32.8647765],
48		['Turkey', 39.0100769, 30.6887968],
49		['Greece', 38.1288335, 22.2382973],
50		['Motenegro', 42.6938651, 18.832949],
51		['Poland', 51.9358379, 16.8921266],
52		['Romania', 45.9237856, 22.777489],
53		['Germany', 51.0968655, 5.9692252],
54		['Netherlands', 52.2093655, 4.158446],
55		['Belgium', 50.4974445, 3.3451696],
56		['United Kingdom', 54.2317179, -13.4259364],
57		['France', 46.1390412, -2.4349004],
58		['Spain', 40.1301633,-8.2016125],
59		['Argentina', -37.0269872, -81.5925865],
60		['Brazil', -13.6632305, -69.6410913],
61		['Puerto Rico', 18.2089747, -67.1463225],
62		['El Salvador', 13.7496798, -89.4906976],
63		['USA', 37.2756537, -104.6561154],
64		['Maldives', 3.1152069, 70.9963528],
65		['Myanmar', 18.9559795, 92.1767893],
66		['Algeria', 27.8198287, -7.3444254],
67		['Madagascar', -18.7615655, 42.3739238],
68		['Senegal', 14.4789336, -15.6380968]
69    ];
70
71    // Info Window Content
72/*        var infoWindowContent = [
73        ['<div class="info_content">' +
74            '<h3 class="info_location_name">Ahmedabad</h3>' +
75            '<p class="info_location_text">758, Shady Pines Drive Martinsville, Ahmedabad</p>' +
76            '<p class="info_location_call"><span><i class="fa fa-phone"></i></span>(800) 123-4567</p>' +
77            '<a href="#" class="btn-link">View Location</a>' +
78
79
80            '</div>'
81        ],
82        ['<div class="info_content">' +
83            '<h3 class="info_location_name">Baroda</h3>' +
84            '<p class="info_location_text">2105, Daylene Drive Southfield,Baroda</p>' +
85            '<p class="info_location_call"><span><i class="fa fa-phone"></i></span>(800) 123-1314</p>' +
86            '<a href="#" class="btn-link">View Location</a>' +
87
88
89            '</div>'
90        ],
91        ['<div class="info_content">' +
92            '<h3 class="info_location_name">Surat</h3>' +
93            '<p class="info_location_text">1012, Matthews StreetSterling, Surat</p>' +
94            '<p class="info_location_call"><span><i class="fa fa-phone"></i></span>(800) 123-1112</p>' +
95            '<a href="#" class="btn-link">View Location</a>' +
96
97
98            '</div>'
99        ],
100        ['<div class="info_content">' +
101            '<h3 class="info_location_name">Jamnagar</h3>' +
102            '<p class="info_location_text">1537, Rosewood Court Holland, Jamnagar</p>' +
103            '<p class="info_location_call"><span><i class="fa fa-phone"></i></span>(800) 123-8910</p>' +
104            '<a href="#" class="btn-link">View Location</a>' +
105
106
107            '</div>'
108        ]
109    ];*/
110    // Display multiple markers on a map
111    var infoWindow = new google.maps.InfoWindow({ maxWidth: 280 }),
112        marker, i;
113
114    // Loop through our array of markers & place each one on the map  
115    for (i = 0; i < markers.length; i++) {
116        var position = new google.maps.LatLng(markers[i][1],markers[i][2], markers[i][3], markers[i][4]);
117        bounds.extend(position);
118        marker = new google.maps.Marker({
119            position: position,
120            map: map,
121            title: markers[i][0]
122        });
123
124        // Allow each marker to have an info window    
125        /*google.maps.event.addListener(marker, 'mouseover', (function(marker, i) {
126            return function() {
127                infoWindow.setContent(infoWindowContent[i][0]);
128                infoWindow.open(map, marker);
129            }
130        })(marker, i));*/
131
132        // Automatically center the map fitting all markers on the screen
133        map.fitBounds(bounds);
134    }
135
136    // Override our map zoom level once our fitBounds function runs (Make sure it only runs once)
137    var  tilesloadedListener = google.maps.event.addListener((map),  'tilesloaded', function(event) {
138        this.setZoom(3);
139        google.maps.event.removeListener(tilesloadedListener);
140    });
141
142}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.