Click on "+" icon to setup your Address.
map_el = `map-20210929`;
if(document.getElementById(map_el)) { /* Transfer PHP array to JS json */ var oum_all_locations = [{"title":"Bio Ware","lat":"52.547157830234","lng":"13.41559946537","zoom":"12","content":"März, 17, Greifenhagener Straße, Helmholtzkiez, Prenzlauer Berg, Pankow, Berlin, 10437, Germany Bio Ware new: Alles type 2: was du willst bio-ware","icon":"https://youfee.de/wp-content/plugins/open-user-map-pro/src/leaflet/images/marker-icon_custom1-2x.png","types":["91"],"post_id":"44965","address":"März, 17, Greifenhagener Straße, Helmholtzkiez, Prenzlauer Berg, Pankow, Berlin, 10437, Germany","text":"","image":"","audio":"","video":"","custom_fields":[{"index":1650258364419,"label":"new","val":"Alles","fieldtype":"text","uselabelastextoption":false,"use12hour":false,"private":false},{"index":1650258378081,"label":"type 2","val":"was du willst","fieldtype":"text","uselabelastextoption":false,"use12hour":false,"private":false}],"votes":0,"star_rating_avg":0,"star_rating_count":0},{"title":"Honey","lat":"52.5170365","lng":"13.3888599","zoom":"12","content":"Berlin, Germany Honey new: What is this? type 2: What is this? Is this the same description as under registration or not? honey","icon":"https://youfee.de/wp-content/plugins/open-user-map-pro/src/leaflet/images/marker-icon_default-2x.png","types":[],"post_id":"44924","address":"Berlin, Germany","text":"Is this the same description as under registration or not?","image":"","audio":"","video":"","custom_fields":[{"index":1650258364419,"label":"new","val":"What is this?","fieldtype":"text","uselabelastextoption":false,"use12hour":false,"private":false},{"index":1650258378081,"label":"type 2","val":"What is this?","fieldtype":"text","uselabelastextoption":false,"use12hour":false,"private":false}],"votes":0,"star_rating_avg":0,"star_rating_count":0},{"title":"new check","lat":"52.5186925","lng":"13.3996024","zoom":"12","content":"Berlin, 10178, Germany new check new: sfghjk type 2: rtyuk Sadika Checking new-check","icon":"https://youfee.de/wp-content/plugins/open-user-map-pro/src/leaflet/images/marker-icon_default-2x.png","types":[],"post_id":"40862","address":"Berlin, 10178, Germany","text":"Sadika Checking","image":"","audio":"","video":"","custom_fields":[{"index":1650258364419,"label":"new","val":"sfghjk","fieldtype":"text","uselabelastextoption":false,"use12hour":false,"private":false},{"index":1650258378081,"label":"type 2","val":"rtyuk","fieldtype":"text","uselabelastextoption":false,"use12hour":false,"private":false}],"votes":0,"star_rating_avg":0,"star_rating_count":0},{"title":"","lat":"51.0834196","lng":"10.4234469","zoom":"12","content":"Germany Warum? Weil der Konsum von “guten” Produkten nicht nur wichtig ist für unsere Gesundheit, für unsere nationale Wirtschaft, für faire Behandlung \u0026 Bezahlung der Arbeitskräfte, sondern auch die Basis für eine akzeptable Nutztierhaltung unter optimierten Umweltbelastungen ist. 40847","icon":"https://youfee.de/wp-content/plugins/open-user-map-pro/src/leaflet/images/marker-icon_default-2x.png","types":[],"post_id":"40847","address":"Germany","text":"Warum? Weil der Konsum von “guten” Produkten nicht nur wichtig ist für unsere Gesundheit, für unsere nationale Wirtschaft, für faire Behandlung \u0026amp; Bezahlung der Arbeitskräfte, sondern auch die Basis für eine akzeptable Nutztierhaltung unter optimierten Umweltbelastungen ist.","image":"https://youfee.de/wp-content/uploads/2022/03/kw4kwcjylog-1024x576.jpg","audio":"","video":"","custom_fields":[],"votes":0,"star_rating_avg":0,"star_rating_count":0}];
// Wait for the main initialization function to be available, then call it function oumWaitForMainInit() { if (typeof oumInitializeMap === 'function') { console.log('🗺️ Open User Map: Starting');
// Initialize the map oumInitializeMap(); } else { setTimeout(oumWaitForMainInit, 100); } }
setTimeout(oumWaitForMainInit, 100); }
map_el = `map-20210929`;
if(document.getElementById(map_el)) {
// Wait for OUMLoader to be defined function oumLoading() { if (typeof OUMLoader !== 'undefined') { // Initialize loader for this map OUMLoader.initLoader(map_el);
// Add event listener for map initialization complete document.addEventListener('oum:map_initialized', function(e) { if (e.detail.mapId === map_el) { OUMLoader.setMapInitialized(map_el); } }); } else { // If OUMLoader is not yet defined, wait and try again setTimeout(oumLoading, 100); } }
// OUM Loading Spinner oumLoading();
// OUM inline JS variables var mapStyle = `Esri.WorldStreetMap`; var oum_tile_provider_mapbox_key = ``; var marker_icon_url = `https://youfee.de/wp-content/plugins/open-user-map-pro/src/leaflet/images/marker-icon_default-2x.png`; var marker_shadow_url = `https://youfee.de/wp-content/plugins/open-user-map-pro/src/leaflet/images/marker-shadow.png`; var oum_enable_scrollwheel_zoom_map = false; var oum_enable_cluster = true; var oum_enable_fullscreen = true;
var oum_enable_searchbar = false; var oum_searchbar_type = `address`;
var oum_geosearch_selected_provider = ``; var oum_geosearch_provider = `osm`; var oum_geosearch_provider_geoapify_key = ``; var oum_geosearch_provider_here_key = ``; var oum_geosearch_provider_mapbox_key = ``;
var oum_enable_searchaddress_button = true; var oum_searchaddress_label = `Suche nach Adresse`;
var oum_enable_searchmarkers_button = true; var oum_searchmarkers_label = `Marker finden`; var oum_searchmarkers_zoom = `8`;
var oum_enable_currentlocation = true; var oum_action_after_submit = `text`; var thankyou_redirect = ``; var start_lat = Number(26); var start_lng = Number(0); var start_zoom = Number(1);
var oum_enable_fixed_map_bounds = ``; var oum_use_settings_start_location = false; var oum_has_regions = false; var oum_enable_multiple_marker_types = `false`; var oum_hide_filterbox = false; var oum_hide_location_popup = false; var oum_enable_address = `on`; var oum_enable_address_autofill = ``;
// WordPress timezone for opening hours calculations var oum_wordpress_timezone = `Europe/Berlin`;
// Custom Image data var oum_custom_image_url = ``; var oum_custom_image_bounds = {}; var oum_custom_image_hide_tiles = false; var oum_custom_image_background_color = `#ffffff`;
var oum_location = {}; var oum_custom_css = ''; var oum_custom_script = ''; var oum_max_image_filesize = 10; var oumMap; var oumMap2;
/** * Conditional Field Feature * * @param {string} sourceField - The source field selector * @param {string} targetField - The target field selector * @param {array} condShow - The values that should show the target field * @param {array|null} condHide - The values that should hide the target field. If empty/null/undefined, the field will be hidden when condShow is not met. */ var oumConditionalField = (sourceField, targetField, condShow, condHide = null) => { const sourceElements = document.querySelectorAll(sourceField); // Select all radios/checkboxes or single select const targetElementWrapper = document.querySelector(targetField)?.parentElement; /* works with custom fields only */
// Check if both sourceElements and targetElementWrapper exist if (!sourceElements.length) { console.warn(`OUM: Source field(s) not found: ${sourceField}`); return; }
if (!targetElementWrapper) { console.warn(`OUM: Target field wrapper not found: ${targetField}`); return; }
/* Event listener for change */ const onChangeHandler = function() { // Get selected values for checkboxes and single selected value for radios/select const selectedValues = Array.from(sourceElements) .filter(element => element.checked || element.tagName === 'SELECT') .map(element => element.value);
const selectedValue = selectedValues[0]; // For radios and selects, we use only the first (and only) value
console.log('OUM: run condition', {selectedValue, sourceField, targetField, condShow, condHide});
// Show or hide target field based on the selected value(s) if (condShow.includes(selectedValue)) { // Show the field if condShow condition is met targetElementWrapper.style.display = 'block'; } else if (condHide && Array.isArray(condHide) && condHide.length > 0 && condHide.includes(selectedValue)) { // Hide the field if condHide is provided and condition is met targetElementWrapper.style.display = 'none'; } else if (!condHide || (Array.isArray(condHide) && condHide.length === 0)) { // If condHide is empty/null/undefined, hide the field when condShow is not met targetElementWrapper.style.display = 'none'; } };
/* Attach the event listener to each radio/checkbox or select */ sourceElements.forEach(element => { element.addEventListener('change', onChangeHandler); });
/* Trigger initially */ onChangeHandler(); // Call it directly to set initial state };
/** * Add Custom Styles */
/* custom color */ oum_custom_css += ` .open-user-map .add-location #close-add-location-overlay:hover {color: #2271b1 !important} .open-user-map .box-wrap .map-wrap .open-add-location-overlay {background-color: #2271b1 !important} .open-user-map .box-wrap .map-wrap .open-add-location-overlay:hover, .open-user-map .box-wrap .map-wrap .open-add-location-overlay:active {background-color: #1f669f !important} .open-user-map .box-wrap .map-wrap .oum-filter-controls .oum-filter-list .close-filter-list:hover {color: #2271b1 !important} .open-user-map .oum-advanced-filter-button .oum-advanced-filter-content .close-advanced-filter:hover, .open-user-map .oum-advanced-filter-panel .oum-advanced-filter-content .close-advanced-filter:hover {color: #2271b1 !important} .open-user-map input.oum-switch[type="checkbox"]:checked + label::before {background-color: #2271b1 !important} .open-user-map .add-location .location-overlay-content #oum_add_location .oum-required-indicator {color: #2271b1 !important} .open-user-map .add-location .location-overlay-content #oum_add_location h2 {color: #2271b1 !important} .open-user-map .add-location .location-overlay-content #oum_add_location input[type=text]:focus, .open-user-map .add-location .location-overlay-content #oum_add_location input[type=email]:focus, .open-user-map .add-location .location-overlay-content #oum_add_location input[type=url]:focus, .open-user-map .add-location .location-overlay-content #oum_add_location textarea:focus, .open-user-map .add-location .location-overlay-content #oum_add_location select:focus {border-color: #2271b1 !important; box-shadow: 0 0 0 2px #2271b11a !important} .open-user-map .add-location .location-overlay-content #oum_add_location_thankyou h3 {color: #2271b1 !important} .open-user-map .oum_location_text a {color: #2271b1 !important} .open-user-map .oum_location_text .oum_vote_button_wrap .oum_vote_button.voted {background: #2271b1 !important; border-color: #2271b1 !important;} .open-user-map .oum-tabs {border-color: #2271b1 !important} .open-user-map .oum-tabs .nav-item:hover {color: #2271b1 !important; border-color: #2271b1 !important} .open-user-map .oum-tabs .nav-item.active {color: #2271b1 !important; border-color: #2271b1 !important} .open-user-map .box-wrap .map-wrap .oum-attribution a {color: #2271b1 !important;} /* Submit Button */ .open-user-map .add-location .location-overlay-content #oum_add_location input[type=submit] {background-color: #2271b1 !important; border-color: #2271b1 !important;} .open-user-map .add-location .location-overlay-content #oum_add_location input[type=submit]:hover, .open-user-map .add-location .location-overlay-content #oum_add_location input[type=submit]:active {background-color: #1f669f !important;} /* Message CTA Buttons */ .open-user-map .add-location .location-overlay-content #oum_add_location_thankyou button {background-color: #2271b1 !important; border-color: #2271b1 !important;} .open-user-map .add-location .location-overlay-content #oum_add_location_thankyou button:hover, .open-user-map .add-location .location-overlay-content #oum_add_location_thankyou button:active {background-color: #1f669f !important;} .open-user-map .add-location .location-overlay-content .oum-delete-confirmation button {background-color: #2271b1 !important; border-color: #2271b1 !important;} .open-user-map .add-location .location-overlay-content .oum-delete-confirmation button:hover, .open-user-map .add-location .location-overlay-content .oum-delete-confirmation button:active {background-color: #1f669f !important;} /* Media Section Colors */ .open-user-map .add-location .location-overlay-content #oum_add_location .oum_media .media-upload label {color: #2271b1 !important} .open-user-map .add-location .location-overlay-content #oum_add_location .oum_media .oum-image-upload .media-upload-top label .multi-upload-indicator {background: #2271b1 !important} .open-user-map .add-location .location-overlay-content #oum_add_location .oum_media .oum-video-upload input[type=text]:hover {border-color: #2271b1 !important} .open-user-map .add-location .location-overlay-content #oum_add_location .oum_media .oum-video-upload input[type=text]:focus {border-color: #2271b1 !important; box-shadow: 0 0 0 2px #2271b11a !important} .open-user-map .add-location .location-overlay-content #oum_add_location .oum_media .image-preview-placeholder {border-color: #2271b1 !important; background: #2271b10a !important} .open-user-map .add-location .location-overlay-content #oum_add_location .oum_media .oum-image-preview-grid .image-preview-item.dragging {border-color: #2271b1 !important} /* List Styles */ .open-user-map-locations-list .oum-locations-list-item .oum_location_text a {color: #2271b1 !important} .open-user-map-locations-list .oum-locations-list-item .oum_location_text .oum_vote_button_wrap .oum_vote_button.voted {background: #2271b1 !important; border-color: #2271b1 !important;}`;
var custom_style = document.createElement('style');
if (custom_style.styleSheet) { custom_style.styleSheet.cssText = oum_custom_css; } else { custom_style.appendChild(document.createTextNode(oum_custom_css)); }
document.getElementsByTagName('head')[0].appendChild(custom_style);
/* Add initial CSS to prevent flash of unstyled content */ var initialStyles = document.createElement('style'); initialStyles.textContent = ` .oum-hidden { opacity: 0 !important; visibility: hidden !important; transition: opacity 0.3s ease, visibility 0.3s ease; } .oum-filter-controls, .open-add-location-overlay, #oum_filter_markers, .oum-advanced-filter-button, .oum-advanced-filter-panel, .oum-sidebar { opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; } .oum-filter-controls.visible, .open-add-location-overlay.visible, #oum_filter_markers.visible, .oum-advanced-filter-button.visible, .oum-advanced-filter-panel.visible, .oum-sidebar.visible { opacity: 1; visibility: visible; } `; document.head.appendChild(initialStyles);
}