<?php
if ( ! defined( 'ABSPATH' ) ) { die( '-1' ); }
/*
 * Templatation.com
 *
 *Image with info for VC
 *
 */


function tt_lc_map_shortcode_fn_vc() {

	vc_map(
		array(
			"icon" => 'tt-vc-block',
			"name" => esc_html__("LC Google map", 'logiscargo'),
			"base" => "tt_lc_map_shortcode",
			'description' => esc_html__( 'Google map (with marker).', 'logiscargo' ),
			"category" => esc_html__('Logiscargo', 'logiscargo'),
			"params" => array(

	            array(
	                'type'        => 'textfield',
	                'heading'     => esc_html__( 'Latitude', 'logiscargo' ),
	                'description'     => esc_html__( 'Google map Latitude', 'logiscargo' ),
	                'param_name'  => 'latitude',
	                'value'       => '-37.812802'
	            ),

	            array(
	                'type'        => 'textfield',
	                'heading'     => esc_html__( 'Longitude', 'logiscargo' ),
	                'description'     => esc_html__( 'Google map Longitude', 'logiscargo' ),
	                'param_name'  => 'longitude',
	                'value'       => '144.956981'
	            ),
/*
				 array(
                    'type' => 'attach_image',
                    'heading' => esc_html__( 'Custom Marker Image', 'logiscargo' ),
                    'param_name' => 'image',
                    'value' => '',
                    'description' => esc_html__( 'Leave empty for default marker image.', 'logiscargo' ),
                ),*/

	            array(
	                'type'        => 'textfield',
	                'heading'     => esc_html__( 'Map zoom', 'logiscargo' ),
	                'param_name'  => 'zoom',
	                'description' => 'Map zooming value. Max # 19, Min # 0.',
	                'value'       => 12
	            ),

                array(
                    'type'       => 'textarea',
                    'heading'    => esc_html__( 'Marker text', 'logiscargo' ),
                    'holder'     => 'div',
                    'param_name' => 'marker_text'
                )
			)
		)
	);
	
}
add_action( 'vc_before_init', 'tt_lc_map_shortcode_fn_vc' );

if(class_exists('WPBakeryShortCode')) {
	class WPBakeryShortCode_tt_lc_map_shortcode extends WPBakeryShortCode {
	}
}