$data['polylines'] = $_POST['shapes_values'];
    $infowindow['map_polyline_setting']['shapes'] = serialize($data);
    $in_loc_data = array('map_polyline_setting' => $infowindow['map_polyline_setting']['shapes']);
    $where['map_id'] = $map_id;
    $insertId = WPGMP_Database::insert_or_update(TBL_MAP, $in_loc_data, $where);
}
if (!empty($_GET['map_id'])) {
    $map_id = $_GET['map_id'];
    $selected_map = $mapobj->fetch(array(array('map_id', '=', $map_id)));
}
$all_map[] = __('Select Map', WPGMP_TEXT_DOMAIN);
foreach ($map_records as $key => $map_record) {
    $all_map[$map_record->map_id] = $map_record->map_title;
}
$form = new Responsive_Markup();
$form->set_form_method('get');
$form->add_element('hidden', 'page', array('value' => $_GET['page']));
$form->set_header(__('Choose Map for Drawing', WPGMP_TEXT_DOMAIN), $response, __('Choose Map for Drawing', WPGMP_TEXT_DOMAIN), 'wpgmp_manage_location');
$form->add_element('select', 'map_id', array('lable' => __('Select map', WPGMP_TEXT_DOMAIN), 'current' => $map_id, 'value' => $data['map_id'], 'desc' => __('Enter here the location title.', WPGMP_TEXT_DOMAIN), 'required' => true, 'options' => $all_map));
$form->render();
if (!empty($_GET['map_id'])) {
    $form = new Responsive_Markup();
    $form->set_header(__('Draw Shapes', WPGMP_TEXT_DOMAIN), $response, __('Draw Shapes', WPGMP_TEXT_DOMAIN), 'wpgmp_manage_location');
    echo $form->get_header();
    echo $form->get_form_header();
    echo "<div class='form-group'><div class='col-md-9'>";
    // do_shortcode("[put_wpgm id=".$map_id."]",false);
    wpgmp_generate_map($selected_map[0]);
    echo "</div><div class='col-md-3'>";
    echo '<h4 class="alert alert-info">' . __('Shape Properties', WPGMP_TEXT_DOMAIN) . '<i class="wpgmp-shape-delete hiderow dashicons-before dashicons-trash"></i></h4>';
    echo "<div class='row hiderow'><div class='col-md-6'>";