{"id":179,"date":"2016-11-04T14:20:19","date_gmt":"2016-11-04T07:20:19","guid":{"rendered":"http:\/\/www.correct.go.th\/copnakw\/?p=179"},"modified":"2016-11-04T14:21:42","modified_gmt":"2016-11-04T07:21:42","slug":"map","status":"publish","type":"post","link":"http:\/\/www.correct.go.th\/copnakw\/index.php\/2016\/11\/04\/map\/","title":{"rendered":"\u0e41\u0e1c\u0e19\u0e17\u0e35\u0e48\u0e40\u0e23\u0e37\u0e2d\u0e19\u0e08\u0e33"},"content":{"rendered":"<p style=\"text-align: center;\"><h1 class='srm_gmap_heading_1 '>\u0e40\u0e23\u0e37\u0e2d\u0e19\u0e08\u0e33\u0e01\u0e25\u0e32\u0e07\u0e19\u0e04\u0e23\u0e2a\u0e27\u0e23\u0e23\u0e04\u0e4c<\/h1>            <script type=\"text\/javascript\">\r\n                jQuery(document).ready(function ($) {\r\n                    var wgm_map = new google.maps.Map(document.getElementById(\"srm_gmp_embed_1\"), {\r\n                        center: new google.maps.LatLng(15.68927179465446,100.11261074729919),\r\n                        zoom:13,\r\n                        mapTypeId: google.maps.MapTypeId.ROADMAP,\r\n                        scrollwheel: true,\r\n                        zoomControl: true,\r\n                        mapTypeControl: true,\r\n                        streetViewControl: true,\r\n                        fullscreenControl: true,\r\n                        draggable: true,\r\n                        disableDoubleClickZoom: false,\r\n                        panControl: true                    });\r\n                    var wgm_theme_json = '';\r\n                    if (wgm_theme_json.length > 0) {\r\n                        wgm_map.setOptions({styles: JSON.parse(wgm_theme_json)});\r\n                    }\r\n                    \/\/ To view directions form and data\r\n                                        var wgm_data_1 = {\r\n                        'action': 'wpgmapembed_p_get_markers_by_map_id',\r\n                        'data': {\r\n                            map_id: '178',\r\n                            ajax_nonce: '7bede5e26c'\r\n                        }\r\n                    };\r\n                    var wgm_ajaxurl_1 = 'http:\/\/www.correct.go.th\/copnakw\/wp-admin\/admin-ajax.php'\r\n                    jQuery.post(wgm_ajaxurl_1, wgm_data_1, function (response) {\r\n                        response = JSON.parse(response);\r\n                        if (response.markers.length === 1) {\r\n                            var wgm_marker_to_1 = response.markers[0].marker_desc.replace(\/&gt;\/g, '>').replace(\/&lt;\/g, '<');\r\n                            jQuery('#srm_gmap_to_1').val(wgm_marker_to_1.replace(\/(<([^>]+)>)\/gi, \"\"));\r\n                        }\r\n                        var wgm_default_marker_icon_1 = 'https:\/\/maps.gstatic.com\/mapfiles\/api-3\/images\/spotlight-poi2.png';\r\n                        if (response.markers.length > 0) {\r\n                            var custom_markers = [];\r\n                            var custom_marker_infowindows = [];\r\n                            response.markers.forEach(function (wgm_marker, i) {\r\n                                var wgm_marker_lat_lng_1 = wgm_marker.lat_lng.split(',');\r\n                                wgm_custom_marker_1 = new google.maps.Marker({\r\n                                    position: new google.maps.LatLng(wgm_marker_lat_lng_1[0], wgm_marker_lat_lng_1[1]),\r\n                                    title: wgm_marker.marker_name,\r\n                                    animation: google.maps.Animation.DROP,\r\n                                    icon: (wgm_marker.icon === '') ? wgm_default_marker_icon_1 : wgm_marker.icon\r\n                                });\r\n                                custom_markers[i] = wgm_custom_marker_1;\r\n                                wgm_custom_marker_1.setMap(wgm_map);\r\n                                var wgm_marker_name_1 = (wgm_marker.marker_name !== null) ? ('<span class=\"info_content_title\" style=\"font-size:18px;font-weight: bold;font-family: Arial;\">'\r\n                                    + wgm_marker.marker_name +\r\n                                    '<\/span><br\/>') : '';\r\n                                wgm_marker.marker_desc = wgm_marker.marker_desc.replace(\/&gt;\/g, '>').replace(\/&lt;\/g, '<');\r\n                                custom_marker_infowindow = new google.maps.InfoWindow({\r\n                                    content: wgm_marker_name_1 + wgm_marker.marker_desc\r\n                                });\r\n                                custom_marker_infowindows[i] = custom_marker_infowindow;\r\n                                if (wgm_marker.show_desc_by_default === '1') {\r\n                                    custom_marker_infowindow.open({\r\n                                        anchor: wgm_custom_marker_1,\r\n                                        shouldFocus: false\r\n                                    });\r\n                                } else {\r\n                                    google.maps.event.addListener(wgm_custom_marker_1, 'click', function () {\r\n                                        custom_marker_infowindows[i].open({\r\n                                            anchor: custom_markers[i],\r\n                                            shouldFocus: false\r\n                                        });\r\n                                    });\r\n                                }\r\n                                if (wgm_marker.have_marker_link === '1') {\r\n                                    google.maps.event.addListener(wgm_custom_marker_1, 'click', function () {\r\n                                        var wgm_target = '_self';\r\n                                        if (wgm_marker.marker_link_new_tab === '1') {\r\n                                            wgm_target = '_blank';\r\n                                        }\r\n                                        window.open(wgm_marker.marker_link, wgm_target);\r\n                                    });\r\n                                }\r\n                            });\r\n                        }\r\n                    });\r\n                });\r\n\r\n            <\/script>\r\n\r\n            <div id=\"srm_gmp_embed_1\"\r\n                 style=\"width:100% !important;height:300px  !important; \">\r\n            <\/div>\r\n                    <br \/>\n<h1 class='srm_gmap_heading_2 '>\u0e40\u0e23\u0e37\u0e2d\u0e19\u0e08\u0e33\u0e0a\u0e31\u0e48\u0e27\u0e04\u0e23\u0e32\u0e27\u0e04\u0e25\u0e2d\u0e07\u0e42\u0e1e\u0e18\u0e34\u0e4c<\/h1>            <script type=\"text\/javascript\">\r\n                jQuery(document).ready(function ($) {\r\n                    var wgm_map = new google.maps.Map(document.getElementById(\"srm_gmp_embed_2\"), {\r\n                        center: new google.maps.LatLng(15.706458701602848,100.09301452823638),\r\n                        zoom:13,\r\n                        mapTypeId: google.maps.MapTypeId.ROADMAP,\r\n                        scrollwheel: true,\r\n                        zoomControl: true,\r\n                        mapTypeControl: true,\r\n                        streetViewControl: true,\r\n                        fullscreenControl: true,\r\n                        draggable: true,\r\n                        disableDoubleClickZoom: false,\r\n                        panControl: true                    });\r\n                    var wgm_theme_json = '';\r\n                    if (wgm_theme_json.length > 0) {\r\n                        wgm_map.setOptions({styles: JSON.parse(wgm_theme_json)});\r\n                    }\r\n                    \/\/ To view directions form and data\r\n                                        var wgm_data_2 = {\r\n                        'action': 'wpgmapembed_p_get_markers_by_map_id',\r\n                        'data': {\r\n                            map_id: '181',\r\n                            ajax_nonce: '7bede5e26c'\r\n                        }\r\n                    };\r\n                    var wgm_ajaxurl_2 = 'http:\/\/www.correct.go.th\/copnakw\/wp-admin\/admin-ajax.php'\r\n                    jQuery.post(wgm_ajaxurl_2, wgm_data_2, function (response) {\r\n                        response = JSON.parse(response);\r\n                        if (response.markers.length === 1) {\r\n                            var wgm_marker_to_2 = response.markers[0].marker_desc.replace(\/&gt;\/g, '>').replace(\/&lt;\/g, '<');\r\n                            jQuery('#srm_gmap_to_2').val(wgm_marker_to_2.replace(\/(<([^>]+)>)\/gi, \"\"));\r\n                        }\r\n                        var wgm_default_marker_icon_2 = 'https:\/\/maps.gstatic.com\/mapfiles\/api-3\/images\/spotlight-poi2.png';\r\n                        if (response.markers.length > 0) {\r\n                            var custom_markers = [];\r\n                            var custom_marker_infowindows = [];\r\n                            response.markers.forEach(function (wgm_marker, i) {\r\n                                var wgm_marker_lat_lng_2 = wgm_marker.lat_lng.split(',');\r\n                                wgm_custom_marker_2 = new google.maps.Marker({\r\n                                    position: new google.maps.LatLng(wgm_marker_lat_lng_2[0], wgm_marker_lat_lng_2[1]),\r\n                                    title: wgm_marker.marker_name,\r\n                                    animation: google.maps.Animation.DROP,\r\n                                    icon: (wgm_marker.icon === '') ? wgm_default_marker_icon_2 : wgm_marker.icon\r\n                                });\r\n                                custom_markers[i] = wgm_custom_marker_2;\r\n                                wgm_custom_marker_2.setMap(wgm_map);\r\n                                var wgm_marker_name_2 = (wgm_marker.marker_name !== null) ? ('<span class=\"info_content_title\" style=\"font-size:18px;font-weight: bold;font-family: Arial;\">'\r\n                                    + wgm_marker.marker_name +\r\n                                    '<\/span><br\/>') : '';\r\n                                wgm_marker.marker_desc = wgm_marker.marker_desc.replace(\/&gt;\/g, '>').replace(\/&lt;\/g, '<');\r\n                                custom_marker_infowindow = new google.maps.InfoWindow({\r\n                                    content: wgm_marker_name_2 + wgm_marker.marker_desc\r\n                                });\r\n                                custom_marker_infowindows[i] = custom_marker_infowindow;\r\n                                if (wgm_marker.show_desc_by_default === '1') {\r\n                                    custom_marker_infowindow.open({\r\n                                        anchor: wgm_custom_marker_2,\r\n                                        shouldFocus: false\r\n                                    });\r\n                                } else {\r\n                                    google.maps.event.addListener(wgm_custom_marker_2, 'click', function () {\r\n                                        custom_marker_infowindows[i].open({\r\n                                            anchor: custom_markers[i],\r\n                                            shouldFocus: false\r\n                                        });\r\n                                    });\r\n                                }\r\n                                if (wgm_marker.have_marker_link === '1') {\r\n                                    google.maps.event.addListener(wgm_custom_marker_2, 'click', function () {\r\n                                        var wgm_target = '_self';\r\n                                        if (wgm_marker.marker_link_new_tab === '1') {\r\n                                            wgm_target = '_blank';\r\n                                        }\r\n                                        window.open(wgm_marker.marker_link, wgm_target);\r\n                                    });\r\n                                }\r\n                            });\r\n                        }\r\n                    });\r\n                });\r\n\r\n            <\/script>\r\n\r\n            <div id=\"srm_gmp_embed_2\"\r\n                 style=\"width:100% !important;height:300px  !important; \">\r\n            <\/div>\r\n                    <\/p>\n<p style=\"text-align: center;\">&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-179","post","type-post","status-publish","format-standard","hentry","category-map"],"_links":{"self":[{"href":"http:\/\/www.correct.go.th\/copnakw\/index.php\/wp-json\/wp\/v2\/posts\/179","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.correct.go.th\/copnakw\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.correct.go.th\/copnakw\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.correct.go.th\/copnakw\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.correct.go.th\/copnakw\/index.php\/wp-json\/wp\/v2\/comments?post=179"}],"version-history":[{"count":4,"href":"http:\/\/www.correct.go.th\/copnakw\/index.php\/wp-json\/wp\/v2\/posts\/179\/revisions"}],"predecessor-version":[{"id":184,"href":"http:\/\/www.correct.go.th\/copnakw\/index.php\/wp-json\/wp\/v2\/posts\/179\/revisions\/184"}],"wp:attachment":[{"href":"http:\/\/www.correct.go.th\/copnakw\/index.php\/wp-json\/wp\/v2\/media?parent=179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.correct.go.th\/copnakw\/index.php\/wp-json\/wp\/v2\/categories?post=179"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.correct.go.th\/copnakw\/index.php\/wp-json\/wp\/v2\/tags?post=179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}