Find a Microsoft Office Near Me | Location Finder | Microsoft (2024)

Microsoft reaches customers at sales offices, support centers and technology centers throughout the country. Use the clickable map or the location links for more information.

OR

View all locations

'); listItems.push('

', results[i].AddressLine, '
', results[i].Locality, ', '); listItems.push(results[i].AdminDistrict, ', ', results[i].CountryRegion, '
', results[i].PostalCode, '

'); listItems.push('

View directions'); if (itemtype == "store") { listItems.push('

'); } else { listItems.push('

'); } listItems.push(''); } listItems.push(""); if (listItems.length <= 2) { listItems.push(' No results found for this criteria.'); } // Use the array of locations from the results to set the map view to show all locations. if (locs.length > 1) { map.setView({ bounds: Microsoft.Maps.LocationRect.fromLocations(locs), padding: 80 }); } else { map.setView({ center: locs[0], zoom: 15 }); } // Add the list items to the results panel. $('.locator-side-panel').html(listItems.join('')); // Add a click event to the title of each list item. $('.locator-side-panel .list-item-title').each(function () { $(this).click(function () { // Get the ID of the selected location var id = $(this).attr('rel'); //Loop through all the pins in the data layer and find the pushpin for the location. var pin; for (var i = 0; i < results.length; i++) { pin = dataLayer.getPrimitives()[i]; if (pin.Metadata.ID != id) { pin = null; } else { break; } } // If a pin is found with a matching ID, then center the map on it and show it's infobox. if (pin) { // Offset the centering to account for the infobox. displayInfobox(pin, i + 1); } }); }); LoadMobileView(); } else { $('.c-progress').hide(); showErrorMsg(' No results found for this search criteria'); } }, error: function (e) { showErrorMsg(e.statusText); } }); } // Takes a pushpin and generates the content for the infobox from the Metadata and displays the infobox. function displayInfobox(pin, sno) { var InfoBoxHTML = "

"; InfoBoxHTML += ""; InfoBoxHTML += "

" + pin.Metadata.Name + "

"; InfoBoxHTML += "

Find a Microsoft Office Near Me | Location Finder | Microsoft (1)

"; InfoBoxHTML += "

" + pin.Metadata.AddressLine + "

" + pin.Metadata.Locality + ", " + pin.Metadata.AdminDistrict + ", " + pin.Metadata.CountryRegion + " " + pin.Metadata.PostalCode + "

"; InfoBoxHTML += "

" + pin.Metadata.Phone + "

"; InfoBoxHTML += "

"; if (pin.Metadata.type == "inovation-center") { InfoBoxHTML += "Find a Microsoft Office Near Me | Location Finder | Microsoft (2)"; } else if (pin.Metadata.type == "store") { InfoBoxHTML += "Find a Microsoft Office Near Me | Location Finder | Microsoft (3)"; } else { //Corporate Office InfoBoxHTML += "Find a Microsoft Office Near Me | Location Finder | Microsoft (4)"; } InfoBoxHTML += "

"; infobox.setOptions({ visible: true, htmlContent: InfoBoxHTML, offset: new Microsoft.Maps.Point(-158, 68) }); infobox.setLocation(pin.getLocation()); infobox.setMap(map); map.setView({ center: pin.getLocation() }); window.closeInfoBox = function () { $(".locator-infobox").remove(); } } function LoadMobileView() { if ($(window).width() <= 540) { if (!!$(".locator-side-panel .c-list").html()) { $(".m-locator .locator-view-toggle").show(); MobileResultView(this, "list"); $(".locator-view-toggle-list").click(function () { MobileResultView(this, "list"); $(".locator-view-toggle-map").prop("disabled", false); $(".locator-view-toggle-list").prop("disabled", true); }); $(".locator-view-toggle-map").click(function () { MobileResultView(this, "map"); $(".locator-view-toggle-list").prop("disabled", false); $(".locator-view-toggle-map").prop("disabled", true); }); } else { $(".m-locator .locator-view-toggle").hide(); $("#myMap").hide(); $(".locator-side-panel-wrapper").hide(); } } else { $(".m-locator .locator-view-toggle").hide(); $(".locator-side-panel-wrapper").show(); $("#myMap").show(); } function MobileResultView(element, viewtype) { if (viewtype == "list") { $(".locator-view-toggle-map").prop("disabled", false); $(".locator-view-toggle-list").prop("disabled", true); $(".locator-side-panel-wrapper").show(); $("#myMap").hide(); } else if (viewtype == "map") { $(".locator-view-toggle-map").prop("disabled", true); $(".locator-view-toggle-list").prop("disabled", false); $("#myMap").show(); $(".locator-side-panel-wrapper").hide(); } } } var strSelecttedValue = ''; var strStateSelecttedValue = ''; var defaultReturnCount = 10; var regexp = /^[A-Za-z]+$/; var suggestedcities = []; require(['jqReady!', 'mscom.locator', 'mscom.statelocator'], function ($, locator, statelocator) { $(function () { locator.locatorinit(); }); $(function () { statelocator.statelocatorinit(); }); }); // autosearch field for city and postal code field define('mscom.locator', ['jqReady!', 'componentFactory', 'autosuggest'], function ($, factory, autosuggest) { function locatorinit() { factory.ComponentFactory.create([ { component: autosuggest.AutoSuggest, selector: '#key-city-postalcode', callback: function (result) { if (result && (result.length > 0)) { if (!!autosuggest) { result[0].subscribe({ onMatchPatternChanged: function (notification) { (function (pattern) { result[0].updateSuggestions(getCities(notification.pattern, 'key-city-postalcode')); })(notification.pattern) }, onSuggestionSelected: function (notification) { strSelecttedValue = notification.resultselected; $("#search-field").val(strSelecttedValue); $('#search-field').setCurPosition($('#search-field').val().length); $('#state-search').val(""); FilterResults(strSelecttedValue); autosuggest.AutoSuggest.preventDefault(); }, onkeypress: function () { $("div#key-city-postalcode ul.c-menu").attr('aria-hidden', 'true'); } }); } } } } ]); } return { locatorinit: locatorinit }; }); // autosearch field for state field define('mscom.statelocator', ['jqReady!', 'componentFactory', 'autosuggest'], function ($, factory, autosuggest) { function statelocatorinit() { factory.ComponentFactory.create([ { component: autosuggest.AutoSuggest, selector: '#key-state', callback: function (result) { if (result && (result.length > 0)) { if (!!autosuggest) { result[0].subscribe({ onMatchPatternChanged: function (notification) { (function (pattern) { result[0].updateSuggestions(getCities(notification.pattern, 'key-state')); })(notification.pattern) }, onSuggestionSelected: function (notification) { strStateSelecttedValue = notification.resultselected; $("#state-search").val(strStateSelecttedValue); $('#state-search').setCurPosition($('#state-search').val().length); $('#search-field').val(""); FilterResults(strStateSelecttedValue); autosuggest.AutoSuggest.preventDefault(); } }); } } } } ]); } return { statelocatorinit: statelocatorinit }; }); //fn setCurPosition $.fn.setCurPosition = function (pos) { this.focus(); this.each(function (index, elem) { if (elem.setSelectionRange) { elem.setSelectionRange(pos, pos); } else if (elem.createTextRange) { var range = elem.createTextRange(); range.collapse(true); range.moveEnd('character', pos); range.moveStart('character', pos); range.select(); } }); return this; }; // startswith work in IE browser by below code if (!String.prototype.startsWith) { String.prototype.startsWith = function (searchString, position) { position = position || 0; return this.indexOf(searchString, position) === position; }; } // includes work in IE browser by below code if (!String.prototype.includes) { String.prototype.includes = function () { 'use strict'; return String.prototype.indexOf.apply(this, arguments) !== -1; }; } // get cities list from that matches with autosearch function getCities(searchString, searchtype) { var filteredCities = []; if (searchtype == "key-city-postalcode") getCitiesList(searchString.toLowerCase()); else getStatesList(searchString.toLowerCase()); if (IsValid(suggestedcities)) { var count = 0; for (var i = 0; i < suggestedcities.length && count < defaultReturnCount; i++) { var citiesstring = suggestedcities[i]; filteredCities.push({ type: 'string', value: citiesstring }); count++; } } return filteredCities; } function IsValid(n) { return n == null || n == "undefined" || n.length == 0 ? !1 : !0 } // city and postal codes list var enusCities = ["Birmingham", "Bentonville", "Tempe", "Chandler", "Scottsdale", "Sacramento", "Mountain View", "Irvine", "Los Angeles", "San Diego", "Canoga Park", "Cerritos", "Corte Madera", "Costa Mesa", "Glendale", "Mission Viejo", "Palo Alto", "Roseville", "San Francisco", "Denver", "Broomfield", "Lone Tree", "Hartford", "Danbury", "Farmington", "Newark", "Ft. Lauderdale", "Tampa", "Aventura", "Boca Raton", "Jacksonville", "Miami", "Orlando", "Sarasota", "Alpharetta", "Atlanta", "Honolulu", "Des Moines", "Boise", "Bloomington", "Chicago", "Downers Grove", "Oak Brook", "Schaumburg", "Indianapolis", "Kansas City", "Overland Park", "Louisville", "Lexington", "Baton Rouge", "Metairie", "Cambridge", "Boston", "Burlington", "Natick", "Chevy Chase", "Bethesda", "Columbia", "Towson", "Elkridge", "South Portland", "Grand Rapids", "Southfield", "Novi", "Troy", "Edina", "St. Louis", "Charlotte", "Raleigh/Durham", "Durham", "Fargo", "Omaha", "Salem", "Iselin", "Bridgewater", "Freehold", "Paramus", "Wayne", "Las Vegas", "New York", "Fairport", "Albany", "Buffalo", "Garden City", "Huntington Station", "Staten Island", "Syracuse", "White Plains", "Cincinnati", "Cleveland", "Columbus", "Beachwood", "Oklahoma City", "Tulsa", "Portland", "Malvern", "Pittsburgh", "King of Prussia", "Providence", "Memphis", "Nashville", "Knoxville", "Austin", "Houston", "San Antonio", "Dallas", "Friendswood", "Frisco", "The Woodlands", "Lehi", "Murray", "Salt Lake City", "Reston", "Glen Allen", "Arlington", "Tysons Corner", "Bellevue", "Lynnwood", "Seattle", "Waukesha", "Wauwatosa", "Alabama", "Arkansas", "Arizona", "California", "Colorado", "Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Iowa", "Idaho", "Illinois", "Indiana", "Kansas", "Kentucky", "Louisiana", "Massachusetts", "Maryland", "Maine", "Michigan", "Minnesota", "Missouri", "North Carolina", "North Dakota", "Nebraska", "New Hampshire", "New Jersey", "Nevada", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "Tennessee", "Texas", "Utah", "Virginia", "Washington", "Wisconsin"]; var enusPostalCodes = ["72712", "74133", "85281", "85251", "85226", "95814", "95678", "94925", "94104", "94103", "94043", "94304", "92614", "92626", "92691", "90703", "90094", "91210", "90067", "91303", "92121", "92108", "80206", "80237", "80124", "80021", "6103", "6032", "6810", "2903", "11746", "10601", "1760", "12207", "11530", "1803", "01803", "2199", "7652", "10019", "10022", "10036", "3079", "7470", "10314", "7728", "8830", "8807", "19406", "19355", "19702", "33309", "33180", "33431", "33132", "33156", "33607", "33609", "34243", "32839", "32809", "32246", "30009", "30346", "30326", "30303", "37919", "35243", "96814", "50309", "50266", "68106", "83702", "55435", "55425", "60601", "60611", "60523", "60515", "60173", "53202", "53226", "61704", "49503", "46240", "45242", "45236", "40223", "40222", "66214", "66210", "40503", "45236", "45242", "46240", "70836", "70002", "14225", "44122", "14450", "21204", "21044", "20815", "20817", "22202", "4106", "22102", "20190", "21075", "23060", "28273", "28211", "48377", "48075", "48084", "44131", "63110-1123", "63117", "61704", "27560", "27713", "58104", "89109", "13204", "43219", "43240", "15237", "15222", "73118", "97204", "97209", "97223", "98188", "98101", "98004", "98105", "38120", "37209", "78759", "78758", "78258", "78216", "78256", "77024", "77380", "77056", "77546", "75225", "75039", "75034", "84111", "84107", "84043", "98037", "98804" ]; var Cities = ["Belgium", "Luxembourg"]; var PostalCodes = ["1930", "L-2165"]; var enauStates = ["Sydney", "Brisbane", "Hobart", "Perth", "Adelaide", "Canberra", "Melbourne", "Westfield Sydney on Pitt Street Mall"]; var enauCities = ["North Ryde", "Sydney", "Brisbane", "Hobart", "Perth", "Adelaide", "Barton", "Southbank", "NSW 2113", "QLD 4000", "TAS 7000", "WA 6000", "SA 5000", "ACT 2600", "VIC 3006", "NSW 2000"]; var enauPostalCodes = ["NSW 2113", "QLD 4000", "TAS 7000", "WA 6000", "SA 5000", "ACT 2600", "VIC 3006", "NSW 2000"]; // get cities list from city array list function getCitiesList(cityName) { if (regexp.test(cityName)) { SuggestionResults(enusCities, cityName); } else { SuggestionResults(enusPostalCodes, cityName); } } function getStatesList(cityName) { SuggestionResults(enusCities, cityName); } $(document).on('click', '.btnpincode', function (event) { SearchResults(event,'#search-field', '#state-search'); }); $(document).on('click', '.btnstate', function (event) { SearchResults(event, '#state-search','#search-field'); }); // Add a key press event to the search box that triggers the search when the user presses Enter key. $(document).on('keypress', '#search-field', function (event) { if (event.keyCode == 13) { SearchResults(event, '#search-field', '#state-search','div#key-city-postalcode ul.c-menu'); } }); $(document).on('keypress', '#state-search', function (event) { if (event.keyCode == 13) { SearchResults(event, '#state-search', '#search-field','div#key-state ul.c-menu'); } }); function SearchResults(event, txtCity, txtState, divText) { event.preventDefault(); $(txtState).val(""); FilterResults($(txtCity).val()); setTimeout(function () { $(divText).attr('aria-hidden', 'true'); }, 100); } function SuggestionResults(suggest, cityName) { if (IsValid(suggest)) { if (regexp.test(cityName)) { suggestedcities = suggest.filter(function (city) { return city.toLowerCase().startsWith(cityName); }); } else { suggestedcities = suggest.filter(function (city) { return city.toLowerCase().includes(cityName); }); } } return suggestedcities; } }

I am an expert in web development and JavaScript programming with extensive experience in building interactive and dynamic web applications. My expertise includes front-end technologies, such as HTML, CSS, and JavaScript, as well as various JavaScript libraries and frameworks, including jQuery and Microsoft Maps API.

The provided code appears to be a JavaScript script related to a location-based service or map application, likely developed for Microsoft. Let me break down the key concepts used in the code:

  1. Microsoft Maps API Integration:

    • The script seems to integrate with Microsoft Maps API to display locations on a map.
    • It mentions the use of a clickable map or location links to provide more information.
  2. Dynamic Content Generation:

    • The script dynamically generates HTML content for location information, including addresses and contact details.
  3. Event Handling:

    • Event handling is implemented to respond to user interactions, such as clicks on location titles.
    • Clicking on a location title triggers the display of additional information, possibly in an infobox.
  4. Mobile Responsiveness:

    • The script includes functionality for mobile responsiveness, adjusting the view and interface based on the device's width.
  5. Autosuggest and Search:

    • The code includes an autosuggest feature for city and postal code fields.
    • It uses an autosuggest component to filter and display suggested cities based on user input.
  6. State Selector:

    • There is a state selector functionality with autosuggest for narrowing down location results based on the selected state.
  7. Error Handling:

    • Error handling is implemented to display messages when no results are found.
  8. City and Postal Code Lists:

    • Lists of cities and postal codes are defined, presumably for providing suggestions during the autosuggest feature.
  9. Mobile View Switching:

    • The script includes logic for toggling between list and map views on mobile devices.
  10. Search Results Handling:

    • Key press events are added to the search box to trigger the search when the user presses the Enter key.
  11. Suggestion Results Filtering:

    • The script filters suggested cities based on user input, considering whether the input is a city name or a postal code.

In summary, this script is likely part of a web application that integrates with Microsoft Maps API to display and interact with location data. It incorporates features for search, autosuggest, mobile responsiveness, and dynamic content generation.

Find a Microsoft Office Near Me | Location Finder | Microsoft (2024)
Top Articles
Latest Posts
Article information

Author: Dong Thiel

Last Updated:

Views: 5888

Rating: 4.9 / 5 (59 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Dong Thiel

Birthday: 2001-07-14

Address: 2865 Kasha Unions, West Corrinne, AK 05708-1071

Phone: +3512198379449

Job: Design Planner

Hobby: Graffiti, Foreign language learning, Gambling, Metalworking, Rowing, Sculling, Sewing

Introduction: My name is Dong Thiel, I am a brainy, happy, tasty, lively, splendid, talented, cooperative person who loves writing and wants to share my knowledge and understanding with you.