{"id":2,"date":"2022-09-12T01:14:18","date_gmt":"2022-09-11T16:14:18","guid":{"rendered":"https:\/\/www.kyuhou.net\/?page_id=2"},"modified":"2024-08-15T09:14:56","modified_gmt":"2024-08-15T00:14:56","slug":"sample-page","status":"publish","type":"page","link":"https:\/\/www.kyuhou.net\/?page_id=2","title":{"rendered":"\u30a2\u30af\u30bb\u30b9"},"content":{"rendered":"\n\n<div class=\"open-user-map\">\n\n  \n  \n<div class=\"box-wrap map-size- map-size-mobile- \">\n  \n  <div class=\"map-wrap\">\n    <div id=\"map-20210929\" class=\"leaflet-map map-style_Esri.WorldStreetMap\"><\/div>\n    \n    \n    \n    \n    \n    <script type=\"text\/javascript\" data-category=\"functional\" class=\"cmplz-native\" id=\"oum-inline-js\">\n      var map_el = `map-20210929`;\n\n      if(document.getElementById(map_el)) {\n\n        var mapStyle = `Esri.WorldStreetMap`;\n        var oum_tile_provider_mapbox_key = ``;\n        var marker_icon_url = `https:\/\/www.kyuhou.net\/wp-content\/plugins\/open-user-map\/src\/leaflet\/images\/marker-icon_default-2x.png`;\n        var marker_shadow_url = `https:\/\/www.kyuhou.net\/wp-content\/plugins\/open-user-map\/src\/leaflet\/images\/marker-shadow.png`;\n        var oum_enable_scrollwheel_zoom_map = false;\n        var oum_enable_cluster = true;\n        var oum_enable_fullscreen = false;\n\n        var oum_enable_searchbar = false;\n        var oum_searchbar_type = `address`;\n\n        var oum_geosearch_selected_provider = ``; \n        var oum_geosearch_provider = `osm`;\n        var oum_geosearch_provider_geoapify_key = ``;\n        var oum_geosearch_provider_here_key = ``;\n        var oum_geosearch_provider_mapbox_key = ``;\n        \n        var oum_enable_searchaddress_button = false;\n        var oum_searchaddress_label = `Search for address`;\n\n        var oum_enable_searchmarkers_button = false;\n        var oum_searchmarkers_label = `Find marker`;\n        var oum_searchmarkers_zoom = `8`;\n\n        var oum_enable_currentlocation = false;\n        var oum_action_after_submit = ``;\n        var thankyou_redirect = ``;\n        var start_lat = `34.709827679502`;\n        var start_lng = `135.46516592088`;\n        var start_zoom = `8`;\n        var oum_enable_fixed_map_bounds = ``;\n        var oum_minimum_zoom_level = ``;\n        var oum_use_settings_start_location = false;\n        var oum_has_regions = false;\n\n        var oum_location = {};\n        var oum_custom_css = '';\n        var oum_custom_script = '';\n        var oumMap;\n        var oumMap2;\n\n        var oumConditionalField = (sourceField, targetField, condShow, condHide) => {\n          const sourceElement = document.querySelector(sourceField);\n          const targetElement = document.querySelector(targetField).parentElement; \/* works with custom fields only *\/\n\n          \/* trigger on change *\/\n          sourceElement.onchange = function(e) {\n            const val = this.value;\n            \n            console.log('OUM: run condition', {val, sourceField, targetField, condShow, condHide});\n            \n            if(condShow.includes(val)) {\n              targetElement.style.display = 'block';\n            }else if(condHide.includes(this.value)) {\n              targetElement.style.display = 'none';\n            }\n          }\n\n          \/* trigger initially *\/\n          let changeEvent = new Event('change');\n          sourceElement.dispatchEvent(changeEvent);\n        };\n\n        \/* Transfer PHP array to JS json *\/\n        var oum_all_locations = [{\"title\":\"\",\"lat\":\"34.709827679502\",\"lng\":\"135.46516592088\",\"content\":\"\\u003Cdiv class=\\u0022oum_location_text\\u0022\\u003E\\u003Ch3 class=\\u0022oum_location_name\\u0022\\u003E\\u003C\/h3\\u003E\\u003Cdiv class=\\u0022oum_location_custom_fields\\u0022\\u003E\\u003C\/div\\u003E\\u003Cdiv class=\\u0022oum_location_description\\u0022\\u003E\\u003C\/div\\u003E\\u003C\/div\\u003E\",\"icon\":\"https:\/\/www.kyuhou.net\/wp-content\/plugins\/open-user-map\/src\/leaflet\/images\/marker-icon_default-2x.png\",\"types\":[],\"post_id\":\"101\"}];\n\n\n        \/**\n         * Add Custom Styles\n         *\/\n        \n        \n          \/* custom color *\/\n          oum_custom_css += `\n            .open-user-map .add-location #close-add-location-overlay:hover {color: #e02aaf !important}\n            .open-user-map input.oum-switch[type=\"checkbox\"]:checked + label::before {background-color: #e02aaf !important}\n            .open-user-map .add-location .location-overlay-content #oum_add_location_thankyou h3 {color: #e02aaf !important}\n            .open-user-map .oum_location_text a {color: #e02aaf !important}\n            .open-user-map .oum-tabs {border-color: #e02aaf !important}\n            .open-user-map .oum-tabs .nav-item:hover {color: #e02aaf !important; border-color: #e02aaf !important}\n            .open-user-map .oum-tabs .nav-item.active {color: #e02aaf !important; border-color: #e02aaf !important}\n            .open-user-map .box-wrap .map-wrap .oum-attribution a {color: #e02aaf !important;}`;\n\n        \n        \n        \n        var custom_style = document.createElement('style');\n\n        if (custom_style.styleSheet) {\n          custom_style.styleSheet.cssText = oum_custom_css;\n        } else {\n          custom_style.appendChild(document.createTextNode(oum_custom_css));\n        }\n\n        document.getElementsByTagName('head')[0].appendChild(custom_style);\n\n      }\n    <\/script>\n\n  <\/div>\n\n  <\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.kyuhou.net\/index.php?rest_route=\/wp\/v2\/pages\/2","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kyuhou.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.kyuhou.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.kyuhou.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kyuhou.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2"}],"version-history":[{"count":5,"href":"https:\/\/www.kyuhou.net\/index.php?rest_route=\/wp\/v2\/pages\/2\/revisions"}],"predecessor-version":[{"id":104,"href":"https:\/\/www.kyuhou.net\/index.php?rest_route=\/wp\/v2\/pages\/2\/revisions\/104"}],"wp:attachment":[{"href":"https:\/\/www.kyuhou.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}