C:\xampp\htdocs\landing\wp-content\plugins\Ultimate_VC_Addons\modules\ultimate_google_maps.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
<?php
/*
* Add-on Name: Ultimate Google Maps
* Add-on URI: https://www.brainstormforce.com
*/
if(!class_exists("Ultimate_Google_Maps")){
    class 
Ultimate_Google_Maps{
        function 
__construct(){
            if ( 
Ultimate_VC_Addons::$uavc_editor_enable ) {
                
add_action("init",array($this,"google_maps_init"));
            }
            
add_shortcode("ultimate_google_map",array($this,"display_ultimate_map"));
            
add_action('wp_enqueue_scripts', array($this'ultimate_google_map_script'),1);
        }
        function 
ultimate_google_map_script()
        {
            
$api 'https://maps.googleapis.com/maps/api/js';
            
$map_key bsf_get_option('map_key');
            if(
$map_key != false) {
                
$arr_params = array(
                    
'key' => $map_key
                
);
                
$api esc_urladd_query_arg$arr_params $api ));
            }
            
wp_register_script("googleapis",$api,null,null,false);
        }
        function 
google_maps_init(){
            if ( 
function_exists('vc_map'))
            {
                
vc_map( array(
                    
"name" => __("Google Map""ultimate_vc"),
                    
"base" => "ultimate_google_map",
                    
"class" => "vc_google_map",
                    
"controls" => "full",
                    
"show_settings_on_create" => true,
                    
"icon" => "vc_google_map",
                    
"description" => __("Display Google Maps to indicate your location.""ultimate_vc"),
                    
"category" => "Ultimate VC Addons",
                    
"params" => array(
                        array(
                            
"type" => "textfield",
                            
"class" => "",
                            
"heading" => __("Width (in %)""ultimate_vc"),
                            
"param_name" => "width",
                            
"admin_label" => true,
                            
"value" => "100%",
                            
"group" => "General Settings"
                        
),
                        array(
                            
"type" => "textfield",
                            
"class" => "",
                            
"heading" => __("Height (in px)""ultimate_vc"),
                            
"param_name" => "height",
                            
"admin_label" => true,
                            
"value" => "300px",
                            
"group" => "General Settings"
                        
),
                        array(
                            
"type" => "dropdown",
                            
"class" => "",
                            
"heading" => __("Map type""ultimate_vc"),
                            
"param_name" => "map_type",
                            
"admin_label" => true,
                            
"value" => array(__("Roadmap""ultimate_vc") => "ROADMAP"__("Satellite""ultimate_vc") => "SATELLITE"__("Hybrid""ultimate_vc") => "HYBRID"__("Terrain""ultimate_vc") => "TERRAIN"),
                            
"group" => "General Settings"
                        
),
                        array(
                            
"type" => "textfield",
                            
"class" => "",
                            
"heading" => __("Latitude""ultimate_vc"),
                            
"param_name" => "lat",
                            
"admin_label" => true,
                            
"value" => "18.591212",
                            
"description" => '<a href="http://universimmedia.pagesperso-orange.fr/geo/loc.htm" target="_blank" rel="noopener">'.__('Here is a tool','ultimate_vc').'</a> '.__('where you can find Latitude & Longitude of your location''ultimate_vc'),
                            
"group" => "General Settings"
                        
),
                        array(
                            
"type" => "textfield",
                            
"class" => "",
                            
"heading" => __("Longitude""ultimate_vc"),
                            
"param_name" => "lng",
                            
"admin_label" => true,
                            
"value" => "73.741261",
                            
"description" => '<a href="http://universimmedia.pagesperso-orange.fr/geo/loc.htm" target="_blank" rel="noopener">'.__('Here is a tool','ultimate_vc').'</a> '.__('where you can find Latitude & Longitude of your location'"ultimate_vc"),
                            
"group" => "General Settings"
                        
),
                        array(
                            
"type" => "dropdown",
                            
"heading" => __("Map Zoom""ultimate_vc"),
                            
"param_name" => "zoom",
                            
"value" => array(
                                
__("18 - Default""ultimate_vc") => 1212345678910111314151617181920
                            
),
                            
"group" => "General Settings"
                        
),
                        array(
                            
"type" => "checkbox",
                            
"heading" => "",
                            
"param_name" => "scrollwheel",
                            
"value" => array(
                                
__("Disable map zoom on mouse wheel scroll""ultimate_vc") => "disable",
                            ),
                            
"group" => "General Settings"
                        
),
                        array(
                            
"type" => "textarea_html",
                            
"class" => "",
                            
"heading" => __("Info Window Text""ultimate_vc"),
                            
"param_name" => "content",
                            
"value" => "",
                            
"group" => "Info Window",
                            
"edit_field_class" => "ult_hide_editor_fullscreen vc_col-xs-12 vc_column wpb_el_type_textarea_html vc_wrapper-param-type-textarea_html vc_shortcode-param",
                        ),
                        array(
                            
"type" => "ult_switch",
                            
"heading" => __("Open on Marker Click","ultimate_vc"),
                            
"param_name" => "infowindow_open",
                            
"options" => array(
                                
"infowindow_open_value" => array(
                                    
"label" => "",
                                    
"on" => __("Yes","ultimate_vc"),
                                    
"off" => __("No","ultimate_vc"),
                                )
                            ),
                            
"value" => "infowindow_open_value",
                            
"default_set" => true,
                            
"group" => "Info Window",
                        ),
                        array(
                            
"type" => "dropdown",
                            
"class" => "",
                            
"heading" => __("Marker/Point icon""ultimate_vc"),
                            
"param_name" => "marker_icon",
                            
"value" => array(__("Use Google Default""ultimate_vc") => "default"__("Use Plugin's Default""ultimate_vc") => "default_self"__("Upload Custom""ultimate_vc") => "custom"),
                            
"group" => "Marker"
                        
),
                        array(
                            
"type" => "ult_img_single",
                            
"class" => "",
                            
"heading" => __("Upload Image Icon:""ultimate_vc"),
                            
"param_name" => "icon_img",
                            
"admin_label" => true,
                            
"value" => "",
                            
"description" => __("Upload the custom image icon.""ultimate_vc"),
                            
"dependency" => Array("element" => "marker_icon","value" => array("custom")),
                            
"group" => "Marker"
                        
),
                        array(
                            
"type" => "dropdown",
                            
"class" => "",
                            
"heading" => __("Marker Animation""ultimate_vc"),
                            
"param_name" => "marker_animation",
                            
"value" => 
                                array(
__("Yes""ultimate_vc") => "yes",
                                        
__("No""ultimate_vc") => "no"),
                            
"group" => "Marker"
                        
),
                        array(
                            
"type" => "dropdown",
                            
"class" => "",
                            
"heading" => __("Street view control""ultimate_vc"),
                            
"param_name" => "streetviewcontrol",
                            
"value" => array(__("Disable""ultimate_vc") => "false"__("Enable""ultimate_vc") => "true"),
                            
"group" => "Advanced"
                        
),
                        array(
                            
"type" => "dropdown",
                            
"class" => "",
                            
"heading" => __("Map type control""ultimate_vc"),
                            
"param_name" => "maptypecontrol",
                            
"value" => array(__("Disable""ultimate_vc") => "false"__("Enable""ultimate_vc") => "true"),
                            
"group" => "Advanced"
                        
),
                        array(
                            
"type" => "dropdown",
                            
"class" => "",
                            
"heading" => __("Zoom control""ultimate_vc"),
                            
"param_name" => "zoomcontrol",
                            
"value" => array(__("Disable""ultimate_vc") => "false"__("Enable""ultimate_vc") => "true"),
                            
"group" => "Advanced"
                        
),
                        array(
                            
"type" => "dropdown",
                            
"class" => "",
                            
"heading" => __("Zoom Control Position""ultimate_vc"),
                            
"param_name" => "zoomcontrolposition",
                            
"value" => array(
                                    
__("Right Bottom""ultimate_vc") => "RIGHT_BOTTOM",
                                    
__("Right Top""ultimate_vc") => "RIGHT_TOP"
                                    
__("Right Center""ultimate_vc") => "RIGHT_CENTER",
                                    
__("Left Top""ultimate_vc") => "LEFT_TOP",
                                    
__("Left Center""ultimate_vc") => "LEFT_CENTER"
                                    
__("Left Bottom""ultimate_vc") => "LEFT_BOTTOM",
                                ),
                            
"dependency" => Array("element" => "zoomcontrol""value" => 'true'),
                            
"group" => "Advanced"
                        
),
                        array(
                            
"type" => "dropdown",
                            
"class" => "",
                            
"heading" => __("Dragging on Mobile""ultimate_vc"),
                            
"param_name" => "dragging",
                            
"value" => array( __("Enable""ultimate_vc") => "true"__("Disable""ultimate_vc") => "false"),
                            
"group" => "Advanced"
                        
),
                        array(
                            
"type" => "dropdown",
                            
"class" => "",
                            
"heading" => __("Dragging on Desktop""ultimate_vc"),
                            
"param_name" => "dragging_desktop",
                            
"value" => array( __("Enable""ultimate_vc") => "true"__("Disable""ultimate_vc") => "false"),
                            
"group" => "Advanced"
                        
),
                        array(
                            
"type" => "dropdown",
                            
"class" => "",
                            
"heading" => __("Top margin""ultimate_vc"),
                            
"param_name" => "top_margin",
                            
"value" => array(
                                
__("Page (small)""ultimate_vc") => "page_margin_top",
                                
__("Section (large)""ultimate_vc") => "page_margin_top_section",
                                
__("None""ultimate_vc") => "none"
                            
),
                            
"group" => "General Settings"
                        
),
                        array(
                            
"type" => "dropdown",
                            
"class" => "",
                            
"heading" => __("Map Width Override""ultimate_vc"),
                            
"param_name" => "map_override",
                            
"value" =>array(
                                
"Default Width"=>"0",
                                
"Apply 1st parent element's width"=>"1",
                                
"Apply 2nd parent element's width"=>"2",
                                
"Apply 3rd parent element's width"=>"3",
                                
"Apply 4th parent element's width"=>"4",
                                
"Apply 5th parent element's width"=>"5",
                                
"Apply 6th parent element's width"=>"6",
                                
"Apply 7th parent element's width"=>"7",
                                
"Apply 8th parent element's width"=>"8",
                                
"Apply 9th parent element's width"=>"9",
                                
"Full Width "=>"full",
                                
"Maximum Full Width"=>"ex-full",
                            ),
                            
"description" => __("By default, the map will be given to the WPBakery Page Builder row. However, in some cases depending on your theme's CSS - it may not fit well to the container you are wishing it would. In that case you will have to select the appropriate value here that gets you desired output..""ultimate_vc"),
                            
"group" => "General Settings"
                        
),
                        array(
                            
"type" => "textarea_raw_html",
                            
"class" => "",
                            
"heading" => __("Google Styled Map JSON","ultimate_vc"),
                            
"param_name" => "map_style",
                            
"value" => "",
                            
"description" => "<a target='_blank' rel='noopener' href='http://googlemaps.github.io/js-samples/styledmaps/wizard/index.html'>".__("Click here","ultimate_vc")."</a> ".__("to get the style JSON code for styling your map.","ultimate_vc"),
                            
"group" => "Styling",
                        ),
                        array(
                                
"type" => "textfield",
                                
"heading" => __("Extra class name""ultimate_vc"),
                                
"param_name" => "el_class",
                                
"description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.""ultimate_vc"),
                                
"group" => "General Settings"
                        
),
                        array(
                            
"type" => "ult_param_heading",
                            
"text" => "<span style='display: block;'><a href='http://bsf.io/f57sh' target='_blank' rel='noopener'>".__("Watch Video Tutorial","ultimate_vc")." &nbsp; <span class='dashicons dashicons-video-alt3' style='font-size:30px;vertical-align: middle;color: #e52d27;'></span></a></span>",
                            
"param_name" => "notification",
                            
'edit_field_class' => 'ult-param-important-wrapper ult-dashicon ult-align-right ult-bold-font ult-blue-font vc_column vc_col-sm-12',
                            
"group" => "General Settings"
                        
),
                        array(
                                
"type" => "dropdown",
                                
"class" => "",
                                
"heading" => __("MapBorder Style""ultimate_vc"),
                                
"param_name" => "map_border_style",
                                
"value" => array(
                                    
"None"=> "",
                                    
"Solid"=> "solid",
                                    
"Dashed" => "dashed",
                                    
"Dotted" => "dotted",
                                    
"Double" => "double",
                                    
"Inset" => "inset",
                                    
"Outset" => "outset",
                                ),
                                
"description" => "",
                                
"group" => "Border"
                            
),
                            array(
                                
"type" => "colorpicker",
                                
"class" => "",
                                
"heading" => __("Border Color""ultimate_vc"),
                                
"param_name" => "map_color_border",
                                
"value" => "",
                                
"description" => "",
                                
"dependency" => Array("element" => "map_border_style""not_empty" => true),
                                
"group" => "Border"
                            
),
                            array(
                                
"type" => "number",
                                
"class" => "",
                                
"heading" => __("Border Width""ultimate_vc"),
                                
"param_name" => "map_border_size",
                                
"value" => 1,
                                
"min" => 1,
                                
"max" => 10,
                                
"suffix" => "px",
                                
"description" => "",
                                
"dependency" => Array("element" => "map_border_style""not_empty" => true),
                                
"group" => "Border"
                            
),
                            array(
                                
"type" => "number",
                                
"class" => "",
                                
"heading" => __("Border Radius","ultimate_vc"),
                                
"param_name" => "map_radius",
                                
"value" => 3,
                                
"min" => 0,
                                
"max" => 500,
                                
"suffix" => "px",
                                
"description" => "",
                                
"dependency" => Array("element" => "map_border_style""not_empty" => true),
                                
"group" => "Border"
                              
),
                              array(
                                    
"type" => "ultimate_spacing",
                                    
"heading" => " Map Margin ",
                                    
"param_name" => "gmap_margin",
                                    
"mode"  => "margin",                    //  margin/padding
                                    
"unit"  => "px",                        //  [required] px,em,%,all     Default all
                                    
"positions" => array(                   //  Also set 'defaults'
                                          
"Top" => "",
                                          
"Right" => "",
                                          
"Bottom" => "",
                                          
"Left" => "",
                                    ),
                                    
'group' => __'Styling''ultimate_vc' ),
                                    
"description" => __("Add spacing from outside to the map.""ultimate_vc"),
                                ),
                            array(
                                    
"type" => "ultimate_spacing",
                                    
"heading" => " Map padding ",
                                    
"param_name" => "gmap_padding",
                                    
"mode"  => "padding",                    //  margin/padding
                                    
"unit"  => "px",                        //  [required] px,em,%,all     Default all
                                    
"positions" => array(                   //  Also set 'defaults'
                                          
"Top" => "",
                                          
"Right" => "",
                                          
"Bottom" => "",
                                          
"Left" => "",
                                    ),
                                    
'group' => __'Styling''ultimate_vc' ),
                                    
"description" => __("Add spacing from outside to the map.""ultimate_vc"),
                                ),
                    )
                ));
            }
        }
        function 
display_ultimate_map($atts,$content null){
            
$width $height $map_type $lat $lng $zoom $streetviewcontrol $maptypecontrol $top_margin $pancontrol $zoomcontrol $zoomcontrolposition $dragging $dragging_desktop $marker_icon $icon_img $map_override $output $map_style $scrollwheel $el_class $map_border_style $map_color_border $map_border_size $marker_animation $map_radius ='';

            
extract(shortcode_atts(array(
                
//"id" => "map",
                
"width" => "100%",
                
"height" => "300px",
                
"map_type" => "ROADMAP",
                
"lat" => "18.591212",
                
"lng" => "73.741261",
                
"zoom" => "14",
                
"scrollwheel" => "",
                
"streetviewcontrol" => "false",
                
"maptypecontrol" => "false",
                
"pancontrol" => "false",
                
"zoomcontrol" => "false",
                
"zoomcontrolposition" => "RIGHT_BOTTOM",
                
"dragging" => "true",
                
"dragging_desktop" => "true",
                
"marker_icon" => "default",
                
"icon_img" => "",
                
"top_margin" => "page_margin_top",
                
"map_override" => "0",
                
"map_style" => "",
                
"el_class" => "",
                
"infowindow_open" => "infowindow_open_value",
                
"map_vc_template" => "",
                
"map_border_style" => "",
                
"map_color_border" => "",
                
"map_border_size" => "",
                
"map_radius" => "",
                
"gmap_margin" => "",
                
"gmap_padding" => "",
                
"marker_animation" => "yes",
            ), 
$atts));

            
$vc_version = (defined('WPB_VC_VERSION')) ? WPB_VC_VERSION 0;
            
$is_vc_49_plus = (version_compare(4.9$vc_version'<=')) ? 'ult-adjust-bottom-margin' '';

            
$border_css$gmap_design_css ='';
            
$gmap_design_css $gmap_margin;
            
$gmap_design_css .=$gmap_padding;
            
$marker_lat $lat;
            
$marker_lng $lng;
            if(
$marker_icon == "default_self"){
                
$icon_url UAVC_URL.'assets/img/icon-marker-pink.png';
            } elseif(
$marker_icon == "default"){
                
$icon_url "";
            } else {
                
$icon_url apply_filters('ult_get_img_single'$icon_img'url');
            }
            
$id "map_".uniqid();
            
$wrap_id "wrap_".$id;
            
$map_type strtoupper($map_type);
            
$width = (substr($width, -1)!="%" && substr($width, -2)!="px" $width "px" $width);
            
$map_height = (substr($height, -1)!="%" && substr($height, -2)!="px" $height "px" $height);

            
$margin_css '';
            if(
$top_margin != 'none')
            {
                
$margin_css $top_margin;
            }

            if(
$map_border_style !='')
                
$border_css .='border-style:'.$map_border_style.';';
            if(
$map_color_border != '')
                
$border_css .= 'border-color:'.$map_color_border.';';
            if(
$map_border_size != '')
                
$border_css .= 'border-width:'.$map_border_size.'px;';
            if(
$map_radius !='')
                
$border_css .='border-radius:'.$map_radius.'px;';
            if(
$map_vc_template == 'map_vc_template_value')
                
$el_class .= 'uvc-boxed-layout';

            
$output .= "<div id='".esc_attr($wrap_id)."' class='ultimate-map-wrapper ".esc_attr($is_vc_49_plus)." ".esc_attr($el_class)."' style='".esc_attr($gmap_design_css)." ".($map_height!="" "height:" $map_height ";" "")."'><div id='" esc_attr($id) . "' data-map_override='".esc_attr($map_override)."' class='ultimate_google_map wpb_content_element ".esc_attr($margin_css)."'" . ($width!="" || $map_height!="" " style='".esc_attr($border_css) . ($width!="" "width:" esc_attr($width) . ";" "") . ($map_height!="" "height:" esc_attr($map_height) . ";" "") . "'" "") . "></div></div>";

            if(
$scrollwheel == "disable"){
                
$scrollwheel 'false';
            } else {
                
$scrollwheel 'true';
            }

            
$output .= "<script type='text/javascript'>
            (function($) {
              'use strict';
            var map_
$id = null;
            var coordinate_
$id;
            var isDraggable = $(document).width() > 641 ? 
$dragging_desktop : $dragging;
            try
            {
                var map_
$id = null;
                var coordinate_
$id;
                coordinate_
$id=new google.maps.LatLng($lat$lng);
                var mapOptions=
                {
                    zoom: 
$zoom,
                    center: coordinate_
$id,
                    scaleControl: true,
                    streetViewControl: 
$streetviewcontrol,
                    mapTypeControl: 
$maptypecontrol,
                    panControl: 
$pancontrol,
                    zoomControl: 
$zoomcontrol,
                    scrollwheel: 
$scrollwheel,
                    draggable: isDraggable,
                    zoomControlOptions: {
                        position: google.maps.ControlPosition.
$zoomcontrolposition
                    },"
;
                    if(
$map_style == ""){
                        
$output .= "mapTypeId: google.maps.MapTypeId.$map_type,";
                    } else {
                        
$output .= " mapTypeControlOptions: {
                              mapTypeIds: [google.maps.MapTypeId.
$map_type, 'map_style']
                        }"
;
                    }
                
$output .= "};";
                if(
$map_style !== ""){
                
$output .= 'var styles = '.rawurldecode(base64_decode(strip_tags($map_style))).';
                        var styledMap = new google.maps.StyledMapType(styles,
                            {name: "Styled Map"});'
;
                }
                
$output .= "var map_$id = new google.maps.Map(document.getElementById('$id'),mapOptions);";
                if(
$map_style !== ""){
                
$output .= "map_$id.mapTypes.set('map_style', styledMap);
                              map_
$id.setMapTypeId('map_style');";
                }
                if(
$marker_lat!="" && $marker_lng!="")
                {
                
$output .= "
                        var x = '"
.esc_attr($infowindow_open)."';
                        var marker_
$id = new google.maps.Marker({
                        position: new google.maps.LatLng(
$marker_lat$marker_lng),
                        animation:  google.maps.Animation.DROP,
                        map: map_
$id,
                        icon: '"
.esc_url($icon_url)."'
                    });"
;
                    if(
$marker_animation == 'yes'){
                    
$output .= "    google.maps.event.addListener(marker_$id, 'click', toggleBounce);"; }

                    if(
trim($content) !== ""){
                        
$output .= "var infowindow = new google.maps.InfoWindow();
                            infowindow.setContent('<div class=\"map_info_text\" style=\'color:#000;\'>"
.trim(preg_replace('/\s+/'' 'do_shortcode($content)))."</div>');";

                            if(
$infowindow_open == 'off')
                            {
                                
$output .= "infowindow.open(map_$id,marker_$id);";
                            }

                            
$output .= "google.maps.event.addListener(marker_$id, 'click', function() {
                                infowindow.open(map_
$id,marker_$id);
                              });"
;

                    }
                }
                
$output .= "}
            catch(e){};
            jQuery(document).ready(function($){
                google.maps.event.trigger(map_
$id, 'resize');
                $(window).resize(function(){
                    google.maps.event.trigger(map_
$id, 'resize');
                    if(map_
$id!=null)
                        map_
$id.setCenter(coordinate_$id);
                });
                $('.ui-tabs').bind('tabsactivate', function(event, ui) {
                   if($(this).find('.ultimate-map-wrapper').length > 0)
                    {
                        setTimeout(function(){
                            $(window).trigger('resize');
                        },200);
                    }
                });
                $('.ui-accordion').bind('accordionactivate', function(event, ui) {
                   if($(this).find('.ultimate-map-wrapper').length > 0)
                    {
                        setTimeout(function(){
                            $(window).trigger('resize');
                        },200);
                    }
                });
                $(window).load(function(){
                    setTimeout(function(){
                        $(window).trigger('resize');
                    },200);
                });
                $('.ult_exp_section').select(function(){
                    if($(map_
$id).parents('.ult_exp_section'))
                    {
                        setTimeout(function(){
                            $(window).trigger('resize');
                        },200);
                    }
                });
                $(document).on('onUVCModalPopupOpen', function(){
                    if($(map_
$id).parents('.ult_modal-content'))
                    {
                        setTimeout(function(){
                            $(window).trigger('resize');
                        },200);
                    }
                });
                $(document).on('click','.ult_tab_li',function(){
                    $(window).trigger('resize');
                    setTimeout(function(){
                        $(window).trigger('resize');
                    },200);
                });
            });
            function toggleBounce() {
              if (marker_
$id.getAnimation() != null) {
                marker_
$id.setAnimation(null);
              } else {
                marker_
$id.setAnimation(google.maps.Animation.BOUNCE);
              }
            }
            })(jQuery);
            </script>"
;
            
$is_preset false//Retrieve preset Code
                
if(isset($_GET['preset'])) {
                    
$is_preset true;
                }
                if(
$is_preset) {
                    
$text 'array ( ';
                    foreach (
$atts as $key => $att) {
                        
$text .= '<br/>    \''.$key.'\' => \''.$att.'\',';
                    }
                    if(
$content != '') {
                        
$text .= '<br/>    \'content\' => \''.$content.'\',';
                    }
                    
$text .= '<br/>)';
                    
$output .= '<pre>';
                    
$output .= $text;
                    
$output .= '</pre>'// remove backslash once copied
                
}
            return 
$output;
        }
    }
    new 
Ultimate_Google_Maps;
    if(
class_exists('WPBakeryShortCode') && !class_exists('WPBakeryShortCode_ultimate_google_map'))
    {
        class 
WPBakeryShortCode_ultimate_google_map extends WPBakeryShortCode {
        }
    }
}
x

Windows NT KPTV 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586