{"id":42,"date":"2016-09-08T14:03:08","date_gmt":"2016-09-08T18:03:08","guid":{"rendered":"http:\/\/chessempirekids.com\/?page_id=42"},"modified":"2024-01-02T17:20:10","modified_gmt":"2024-01-02T22:20:10","slug":"locate-us","status":"publish","type":"page","link":"https:\/\/chessempirekids.com\/index.php\/locate-us\/","title":{"rendered":"Locate us"},"content":{"rendered":"<div class=\"phone-no\">\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      <div class=\"oum-attribution\">made with <a href=\"https:\/\/www.open-user-map.com\/?ref=map\" title=\"Open User Map | Everybody can add locations\" target=\"_blank\">OUM<\/a><\/div>\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:\/\/chessempirekids.com\/wp-content\/plugins\/open-user-map\/src\/leaflet\/images\/marker-icon_default-2x.png`;\n        var marker_shadow_url = `https:\/\/chessempirekids.com\/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_collapse_filter = false;\n        var oum_action_after_submit = ``;\n        var thankyou_redirect = ``;\n        var start_lat = `42.4473175`;\n        var start_lng = `-71.2245003`;\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 locations_without_type = [];\n        var locations_by_type = [];\n        var oum_custom_css = '';\n        var oum_custom_script = '';\n        var oumMap;\n        var oumMap2;\n\n        var oumPrepareLocations = (location) => {\n          \/\/console.log(location, 'location');\n          if(location.type) {\n            \/\/ add new marker category to array if not exists\n            if(!locations_by_type.find(markercategory => markercategory.id === location.type)) {\n              let newmarkercategory = {\n                id: location.type,\n                name: location.type_name,\n                icon: location.icon,\n                locations : []\n              }\n              locations_by_type.push(newmarkercategory);\n            }\n\n            \/\/ add location to marker category\n            let markercategory = locations_by_type.find(markercategory => markercategory.id === location.type);\n            markercategory.locations.push(location);\n\n          }else{\n            locations_without_type.push(location);\n          }\n        };\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 array *\/\n        var oum_all_locations = [{\"title\":\"Lexington Recreation Club\",\"lat\":\"42.4473175\",\"lng\":\"-71.2245003\",\"content\":\"<div class=\\\"oum_location_text\\\"><div class=\\\"oum_location_address\\\"><a title=\\\"go to Google Maps\\\" href=\\\"https:\\\/\\\/www.google.com\\\/maps\\\/search\\\/?api=1&amp;query=42.4473175%2C-71.2245003\\\" target=\\\"_blank\\\">Massachusetts<\\\/a><\\\/div><h3 class=\\\"oum_location_name\\\">Lexington Recreation Club<\\\/h3><div class=\\\"oum_location_custom_fields\\\"><\\\/div><div class=\\\"oum_location_description\\\"><\\\/div><\\\/div>\",\"icon\":\"https:\\\/\\\/chessempirekids.com\\\/wp-content\\\/plugins\\\/open-user-map\\\/src\\\/leaflet\\\/images\\\/marker-icon_default-2x.png\",\"type\":\"\",\"type_name\":\"\",\"post_id\":\"897\"}];\n\n        \/* Group Locations by marker categories (if exist) for further processing *\/\n        oum_all_locations.forEach(oumPrepareLocations);\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<p>Phone: +1 603 416 9028<\/p>\n<p>Email: <a href=\"mailto:prathibalance@gmail.com\">prathibalance@gmail.com<\/a><\/p>\n<\/div>\n<div class=\"phone-no\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Phone: +1 603 416 9028 Email: prathibalance@gmail.com<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"_links":{"self":[{"href":"https:\/\/chessempirekids.com\/index.php\/wp-json\/wp\/v2\/pages\/42"}],"collection":[{"href":"https:\/\/chessempirekids.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/chessempirekids.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/chessempirekids.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chessempirekids.com\/index.php\/wp-json\/wp\/v2\/comments?post=42"}],"version-history":[{"count":9,"href":"https:\/\/chessempirekids.com\/index.php\/wp-json\/wp\/v2\/pages\/42\/revisions"}],"predecessor-version":[{"id":899,"href":"https:\/\/chessempirekids.com\/index.php\/wp-json\/wp\/v2\/pages\/42\/revisions\/899"}],"wp:attachment":[{"href":"https:\/\/chessempirekids.com\/index.php\/wp-json\/wp\/v2\/media?parent=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}