{"id":139,"date":"2023-08-13T21:45:53","date_gmt":"2023-08-13T21:45:53","guid":{"rendered":"https:\/\/concegroup.com\/?page_id=139"},"modified":"2024-02-06T19:54:38","modified_gmt":"2024-02-06T19:54:38","slug":"locations","status":"publish","type":"page","link":"https:\/\/concegroup.com\/?page_id=139","title":{"rendered":"Locations"},"content":{"rendered":"\n<div class=\"open-user-map\">\n\n  \n  \n<div class=\"box-wrap map-size-default map-size-mobile-square \">\n  \n  <div class=\"map-wrap\">\n    <div id=\"map-20210929\" class=\"leaflet-map map-style_OpenStreetMap.Mapnik\"><\/div>\n    \n    \n    \n    \n    <script type=\"text\/javascript\" data-category=\"functional\" id=\"oum-inline-js\">\n      var map_el = `map-20210929`;\n\n      if(document.getElementById(map_el)) {\n\n        var mapStyle = `OpenStreetMap.Mapnik`;\n        var marker_icon_url = `https:\/\/concegroup.com\/wp-content\/plugins\/open-user-map\/src\/leaflet\/images\/marker-icon_custom1-2x.png`;\n        var marker_shadow_url = `https:\/\/concegroup.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 = true;\n\n        var oum_enable_searchbar = false;\n        var oum_searchbar_type = `address`;\n        \n        var oum_enable_searchaddress_button = false;\n        var oum_searchaddress_label = `Enter address`;\n\n        var oum_enable_searchmarkers_button = true;\n        var oum_searchmarkers_label = `Find marker`;\n        var oum_searchmarkers_zoom = `10`;\n\n        var oum_enable_currentlocation = false;\n        var oum_collapse_filter = false;\n        var oum_action_after_submit = `text`;\n        var thankyou_redirect = ``;\n        var start_lat = `33.996986909803`;\n        var start_lng = `-118.41156215319`;\n        var start_zoom = `9.3255479758866`;\n        var oum_enable_fixed_map_bounds = `on`;\n        var oum_minimum_zoom_level = ``;\n        var oum_use_settings_start_location = true;\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\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\":\"Los Angeles Office\",\"lat\":\"34.069512581773\",\"lng\":\"-118.22799144072\",\"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=34.069512581773%2C-118.22799144072\\\" target=\\\"_blank\\\">Los Angeles, CA<\\\/a><\\\/div><h3 class=\\\"oum_location_name\\\">Los Angeles Office<\\\/h3><div class=\\\"oum_location_custom_fields\\\"><\\\/div><div class=\\\"oum_location_description\\\">T: (213) 534-8330<br><br>Contact: Steven Yetemian<\\\/div><\\\/div>\",\"icon\":\"https:\\\/\\\/concegroup.com\\\/wp-content\\\/plugins\\\/open-user-map\\\/src\\\/leaflet\\\/images\\\/marker-icon_custom1-2x.png\",\"type\":\"\",\"type_name\":\"\",\"post_id\":\"207\"},{\"title\":\"Los Angeles Office\",\"lat\":\"34.069512581773\",\"lng\":\"-118.22799144072\",\"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=34.069512581773%2C-118.22799144072\\\" target=\\\"_blank\\\">Los Angeles, CA<\\\/a><\\\/div><h3 class=\\\"oum_location_name\\\">Los Angeles Office<\\\/h3><div class=\\\"oum_location_custom_fields\\\"><\\\/div><div class=\\\"oum_location_description\\\">T: (213) 534-8330<br><br>Contact: Steven Yetemian<\\\/div><\\\/div>\",\"icon\":\"https:\\\/\\\/concegroup.com\\\/wp-content\\\/plugins\\\/open-user-map\\\/src\\\/leaflet\\\/images\\\/marker-icon_custom1-2x.png\",\"type\":\"\",\"type_name\":\"\",\"post_id\":\"142\"}];\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\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        \/**\n         * Add Custom JS\n         *\/\n\n        \n      }\n    <\/script>\n\n  <\/div>\n\n  <\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":23,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-139","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/concegroup.com\/index.php?rest_route=\/wp\/v2\/pages\/139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/concegroup.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/concegroup.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/concegroup.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/concegroup.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=139"}],"version-history":[{"count":3,"href":"https:\/\/concegroup.com\/index.php?rest_route=\/wp\/v2\/pages\/139\/revisions"}],"predecessor-version":[{"id":143,"href":"https:\/\/concegroup.com\/index.php?rest_route=\/wp\/v2\/pages\/139\/revisions\/143"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/concegroup.com\/index.php?rest_route=\/wp\/v2\/media\/23"}],"wp:attachment":[{"href":"https:\/\/concegroup.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}