Unlock Super Savings with Storage Sense!
Rent a storage unit online at your local Storage Sense facility and take advantage of our lowest rates. *Terms and conditions apply!
Skip to content Skip to navigationSkip to toolbar
Search near current location
HomeAll Locationsmarylandsalisbury
Filters and Hours
Sorry Search Combination
`; } facility+=`
${value.facility_name}
` if(!value.facility_phone){ facility+=`
${SHARED.candee_translate('Call', candee_js_variables.lang)} : ${value.facility_phone}
` } if(isSingle == 0){ // /blockDis = SHARED.getDistance(addressGeoLat, addressGeoLng, +value.lat, +value.lng); distanceText = (SHARED.candee_translate('Distance', candee_js_variables.lang)+': '); if(candee_js_variables.measurement == 'metric'){ distanceText += SHARED.candee_convert_to_metric(value.distanceSort.toFixed(1), 'miles', candee_js_variables.lang, false); } else { distanceText += value.distanceSort.toFixed(1)+' '+SHARED.candee_translate('Miles', candee_js_variables.lang); } facility+=`
${distanceText}
`; } facility+=`
${value.facility_address}
${value.facility_city} ${value.facility_region} ${value.facility_zipcode}
`; facility+=`
`; if (value.data_show_map_buttons !== 'hide'){ facility+=` ${value.data_google_map_location_button_text} `; } facility+=` ${value.data_google_location_rent_button_text} ` if (value.supplies_link.includes('http')){ facility+=` ${SHARED.candee_translate('Supplies')} ` } facility+=`
`; if (value.facility_features && value.facility_features_hiden_icons != 'true'){ icons = value.facility_features; icons = icons.filter(item => item.text !=''); if(icons.length > 0){ facility+=`
`; icons.map(item =>{ if(!(SHARED.isset(item.label) && item.label != '' )) { item.label = item.text; item.feature = item.text; item.icon = SHARED.createFeatureIcon(item.text); } let checked = dataFacilityFilter.find(itemFilter => itemFilter.toLowerCase() == item.feature.toLowerCase()); facility+=``; }); facility+=`
`; } } facility+=`
'+ // value.facility_region +'
'+ // value.facility_zipcode // var dataMarkerTemplate = { // name: value.facility_name, // address: value.facility_address, // longitude: value.lng, // latitude: value.lat, // city: citystatezip, // state: '', // zip: '', // link: value.data_google_rent_link, // } // var info = MAP.markerTemplate(dataMarkerTemplate); // dataLocationMapa.push( { // info, // lat: value.lat, // lng: value.lng, // prop_id: value.prop_id // }); LOCATIONS.loadMiniPitches(); }) cQuery('.candeeLocationLoadingWrapper').hide(); LOCATIONS.activateObserver(); showedFacilities+= data.length; if (locationReviewsCount == 0){ cQuery('#sortingOptions').hide(); cQuery('#search_name').hide(); } else { cQuery('#sortingOptions').removeClass('hidden').show(); cQuery('#search_name').removeClass('hidden').show(); cQuery('#button-search').removeClass('hidden').show(); } //*** this is only set when candee_locaitons loadall="false" or you will get an ERROR*** // MAP.setMapLocations(dataLocationMapa); if ('' == ''){ // Only update cards with user location if search was not made LOCATIONS.updateLongLat(); } if(updateResult) { LOCATIONS.setTotalLocations(); } else { updateResult = true; } }, drawFacilityPin: async (data)=>{ if(data.length != dataLocationMapa.length){ if(updateResult) { dataLocationMapa = []; MAP.clearMarkers(); } await data.map(value => { var city = value.facility_city +'
'+ value.facility_region +'
'+ value.facility_zipcode var dataMarkerTemplate = { name: value.name, address: value.address, longitude: value.longitude, latitude: value.latitude, city, state: '', zip: '', link: value.link, } var info = MAP.markerTemplate(dataMarkerTemplate); dataLocationMapa.push( { info, lat: value.latitude, lng: value.longitude, prop_id: value.prop_id }); }) MAP.setMapLocations(dataLocationMapa); } }, removeAllFacilities: () =>{ dataLocationMapa = []; showedFacilities = 0; const list = document.getElementById("facilities"); if (list.hasChildNodes()) { while (list.hasChildNodes()) { list.removeChild(list.firstChild); } } }, showMoreFacility: async ()=> { facilityShowed = []; cQuery.each(cQuery('.candee .candee_locations_block:not(.notWithinRadius)'), function( index, value ) { if(cQuery(this).attr('data-propid')) { facilityShowed.push(cQuery(this).attr('data-propid')); } }); cQuery('.liCheckbox_ripple ').addClass('liCheckboxInhability') cQuery('.liCheckbox_ripple input[type=checkbox]').attr('disabled', true); if(!processingInformationn){ processingInformationn = true; } else { return false; } cQuery('.candeeLocationLoadingWrapper').show(); cQuery('#showing_result').hide(); cQuery('#show-more-facility').addClass("hidden"); data = await LOCATIONS.getFacilities({ notInclude: facilityShowed, sortingName, filterFeature: dataFacilityFilter, countShowPerSecction: countFacilityShowPerSecction }) cQuery('.candeeLocationLoadingWrapper').hide(); if(!SHARED.isset(data.data) || data.data.length == 0){ cQuery('.noResults.candee_translate').show(); cQuery('.candeeLocationLoadingWrapper').hide(); return false } countDataFacillity = data.count countUnits = data.count LOCATIONS.habilityFilterFeature(data.filterHability); LOCATIONS.drawFacility(data.data); LOCATIONS.drawFacilityPin(data.data_ping); if((facilityShowed.length + countFacilityShowPerSecction) < countDataFacillity ){ cQuery('#show-more-facility').removeClass("hidden"); } cQuery('#showing_result').show(); }, checkFilter : async(id) =>{ if(!SHARED.isset(filterFeature[id])){ return false; } let checked = cQuery('#checkbox_'+id).is(':checked'); filterFeature[id].is_clickeable = !checked; filterFeature[id].is_check = checked; text = filterFeature[id].text; if(checked){ dataFacilityFilter.push(text) } else { dataFacilityFilter = dataFacilityFilter.filter(item=> item !== text) } const list = document.getElementById("facilities"); if (list.hasChildNodes()) { while (list.hasChildNodes()) { list.removeChild(list.firstChild); } } cQuery('#show-more-facility').addClass("hidden"); await LOCATIONS.removeAllFacilities(); cQuery("#facilities").html(''); LOCATIONS.showMoreFacility(); }, toggleCheck : async() =>{ let checked = cQuery('#select_all_checkbox').is(':checked'); dataFacilityFilter = []; filterFeature = filterFeature.map((feature, index) => { feature.is_clickeable = checked; feature.is_check = checked; cQuery('#checkbox_'+index).prop('checked', checked); cQuery('#checkbox_'+index).prop('disabled', false); cQuery('#liCheckbox_'+index).removeClass('liCheckboxInhability'); if(checked && feature.text != ''){ dataFacilityFilter.push(feature.text); } return feature }); cQuery('#show-more-facility').addClass("hidden"); LOCATIONS.removeAllFacilities(); LOCATIONS.showMoreFacility(); }, search : () =>{ let search = cQuery('#search_feature').val(); filterFeature.map((feature, index) => { search= search.toLowerCase(); text= feature.text.toLowerCase(); cQuery('#liCheckbox_'+index).hide(); if(feature.text.toLowerCase().includes(search)) { cQuery('#liCheckbox_'+index).show(); } }); }, searchName : () =>{ // oldSortingName = sortingName; sortingName = cQuery('#search_name').val(); // if((sortingName.length == 0 || sortingName.length >= 3) && sortingName != oldSortingName) { cQuery('#show-more-facility').addClass("hidden"); LOCATIONS.removeAllFacilities(); LOCATIONS.showMoreFacility(); // } }, habilityFilterFeature: (data) => { cQuery('.liCheckbox_ripple').removeClass('liCheckboxInhability') cQuery('.liCheckbox_ripple').attr("disabled", false); let countItemFilter = dataFacilityFilter.length; filterFeature = filterFeature.map((item, index) =>{ cQuery('#checkbox_'+index).prop('disabled', false); cQuery('#liCheckbox_'+index).removeClass('liCheckboxInhability'); if(countItemFilter > 0) { item.is_clickeable = data.includes(item.text.toLowerCase()); cQuery('#checkbox_'+index).prop('disabled', !item.is_clickeable); if(!item.is_clickeable){ cQuery('#liCheckbox_'+index).addClass('liCheckboxInhability'); } else{ cQuery('#liCheckbox_'+index).removeClass('liCheckboxInhability'); } } return item; }) }, setTotalLocations: function(){ //set total facilities countUnits +=cQuery('#facilities .lineItem:not(.clickandstor)').length let count_showing_result= cQuery('#facilities .lineItem').length; count_showing_result = +countUnits > +count_showing_result ? countUnits : count_showing_result cQuery("#progressbar").attr('max', countUnits).attr('value', count_showing_result); cQuery('.totalRentals').text(countUnits); cQuery('#count_showing_result').text(count_showing_result); if(parseInt(countDataFacillity) > 0){ cQuery('.noResults').hide(); cQuery('#showHeaderMap').click(); }else{ cQuery('.noResults').show(); if (cQuery('#facilityMap').css('display') == 'block'){ cQuery('#showHeaderMap').click(); } } }, sortByDistance: function(arg, sel, elem, order){ try{ var sortSelector = cQuery(sel), sortElement = sortSelector.children(elem); sortElement.sort(function(a, b) { var an = parseFloat(a.getAttribute(arg)), bn = parseFloat(b.getAttribute(arg)); if (order == "asc") { if (an > bn) return 1; if (an < bn) return -1; } else if (order == "desc") { if (an < bn) return 1; if (an > bn) return -1; } return 0; }); sortElement.detach().appendTo(sortSelector); }catch(er){ console.warn('Cant sort by location', er); } }, updateLongLat: function(){ LOCATIONS.runUpdateLongLat(0); }, runUpdateLongLat: function(latUpdateGeo){ if (MAP.mapLoaded == true && SHARED.bowserLat && SHARED.bowserLng){ var bowserLat = SHARED.bowserLat; var bowserLng = SHARED.bowserLng; cQuery('.candee_locations_block').each(function(index, link){ var blockLat = cQuery(this).attr('data-lat'); var blockLng = cQuery(this).attr('data-lng'); var blockDis = SHARED.getDistance(bowserLat, bowserLng, +blockLat, +blockLng); cQuery(this).attr('data-distance', blockDis); if(candee_js_variables.measurement == 'metric'){ cQuery(this).find('.candeeDistance').text(SHARED.candee_translate('Distance', candee_js_variables.lang)+': '+SHARED.candee_convert_to_metric(blockDis, 'miles', candee_js_variables.lang, false)); } else { cQuery(this).find('.candeeDistance').text(SHARED.candee_translate('Distance', candee_js_variables.lang)+': '+blockDis+' '+SHARED.candee_translate('Miles', candee_js_variables.lang)); } }); // Update location cards after LOCATIONS.sortByDistance("data-distance", ".candee_locations_main_wrapper", ".candee_locations_block", "asc"); } else if (latUpdateGeo == 60) { // After 60 seconds, stop checking console.warn("Map not initiated for Geocoder"); } else { latUpdateGeo++; // increment attempts setTimeout(function(){ LOCATIONS.runUpdateLongLat(); }, 1000); // check if map is loaded every second. } // End if map.mapLoaded conditional }, loadMiniPitches: function(){ // Mini pitch settings var pitchLimitSetting = 'disable'; if (pitchLimitSetting != 'disable' && SHARED.isset(cQuery('.candee .candee_locations_block:not(.notWithinRadius)'))){ var visibleCardsCount = cQuery('.candee .candee_locations_block:not(.notWithinRadius)').length; var pitchLimit = pitchLimitSetting == 'default' ? 5 : 9999999999; // Default is 5 locations. Otherwise it's all locations var currentPitchCount = cQuery('.candee .candee_locations_block .pitch_theme_8').length; if (currentPitchCount < pitchLimit){ cQuery('.candee .candee_locations_block:not(.notWithinRadius)').each(function(index){ var el = cQuery(this); var propid = el.attr('data-propid'); if ((!SHARED.isset(propid) && propid == '') || currentPitchCount >= pitchLimit){ // If no prop id exists or we have reached the pitch limit, don't load a pitch block return; } if (el.find('.pitch_theme_8').length == 0 && el.attr('loading_pitch') != 'true'){ // Prevent loading multiple pitch blocks el.attr('loading_pitch', true); var variables = { 'shortcode': '[candee_pitch ajax="false" theme="pitch_theme_8" card_limit="3" prop_id="'+propid+'" price_label="default" ]' }; cQuery.ajax({ type: 'POST', url: ajaxurl, data: { action: 'candee_ajax_load_template', query_vars: variables, current_url: '', ajax_data: { 'theme' : 'templates/ajax_load/ajax_load_theme_2.php' }, }, success: function(response){ if (el.find('.pitch_theme_8').length == 0){ el.append(response); } }, fail: function(response){ console.warn('ERROR: '+response); } }); } currentPitchCount++; }); } } } } docReady(function() { cQuery('.hasSearchAddress').val(""); cQuery('body').addClass('locations_theme_2'); navigator.permissions.query({ name: 'geolocation' }) .then(response => { if(response.state === 'granted'){ SHARED.getLatLong(LOCATIONS.initialize, null, true); return false; } cQuery('#buttonNearMe').removeClass('disabled') LOCATIONS.initialize(); })cQuery('#buttonNearMe').on('click', function(){ navigator.geolocation.watchPosition(function(position) { if(SHARED.isset(LOCALSTORAGE.getItem('candee_storage_address')) ){ let candee_storage_address = JSON.parse(LOCALSTORAGE.getItem('candee_storage_address')) const urlParams = new URLSearchParams(window.location.search); urlParams.set('address', candee_storage_address.formatted_address); urlParams.set('radius', ''); window.location.search = urlParams; } }); }); //filter button cQuery('.masterFeatureFilterCheckbox').on('click', function(){ //fire event cQuery('body').trigger('masterFeatureFilterCheckboxClicked'); //clear pins MAP.clearMarkers(); }); // Card icons click to select master checkbox togglecQuery(document).on('click', '.masterFeatureFilterCheckbox ', function(){ let index = cQuery(this).attr('data-index'); LOCATIONS.checkFilter(index) })cQuery(document).on('click', '.featIconToggle', function(){ var selectedFeature = cQuery(this).attr('data-feature').toLowerCase(); let id = filterFeature.findIndex(item => item.text.toLowerCase() === selectedFeature) let checked = cQuery('#checkbox_'+id).is(':checked'); cQuery('#checkbox_'+id).prop('checked', !checked); LOCATIONS.checkFilter(id) });cQuery('.master_icon_filters li').keypress(function(e){if(e.which === 13) {cQuery(this).find('.masterFeatureFilterCheckbox').click();} }); cQuery('body').on('change', '#sortingOptions', function (e) { var valueSelected = this.value; sortingFacilities = valueSelected; LOCATIONS.removeAllFacilities(); LOCATIONS.showMoreFacility() cQuery(document).trigger('candee_locations_sorted'); }); });