Home
Wiki
Home
Wiki
  1. 2. Components
  • Back to home
  • 1. Themes
  • Vs Code
    • Getting Started
  • Kitchenware
    • Layout
      • New Layout
      • Legacy Layout
    • Components
      • Announcement
      • Banner Carousel
      • Banner With Products Carousel
      • Blog Category List
      • Blog List
      • Brand List
      • Brands Carousel
      • Breadcrumb
      • Call To Action
      • Cart
      • Categories List
      • Change Password
      • Checkout
      • Cookie Manager
      • Filter list
      • Footer
      • Forgot Password
      • Form
      • Hero Carousel
      • Icon Block
      • Invitation
      • Last Visited Products
      • Layout
      • Login
      • Map
      • Nav Bar
      • Offer
      • Product Attachments
      • Product Attributes
      • Product Documentation
      • Product Expected
      • Product Modal
      • Products Block
      • Products Carousel
      • Product Single
      • Profile
      • Quote
      • Register
      • Related Products
      • Search
      • Stores
      • Subscribe Newsletter
      • Text with Image
      • Top Bar
      • Video
    • Reusables
      • Getting Started
    • Assets
      • Getting Started
    • SDK
      • Products
        • _findProductsByCategory
        • _findProductsByIds
        • _findProductsByTitle
        • _findProductsByFilter
        • _findProductsByCriteria
        • _findProductsAndCalculate
        • _findProductsThenCalculate
        • _getProductAttributeSet
        • _setLastVisited
      • Categories
        • _findCategoryTreeById
        • _findCategoriesByIds
        • _findCategoryByAlias
        • _findCategoryTreeByAlias
        • _getCategoryContent
      • Collections
        • _getCollectionContent
        • _findCollectionsByIds
        • _findCollectionsByIdsThenCalculate
      • Brands
        • _getBrandContent
        • _findBrandsByIds
      • Cart
        • _addToCartMulti
        • _addToCart
        • _setCart
        • _clearCart
        • _setCartListener
        • _removeFromCart
        • _calculateCart
      • Checkout
        • _startCheckout
        • _updateCheckout
        • _completeCheckout
      • Shopping Lists
        • _getShoppingLists
        • _updateShoppingList
        • _createShoppingList
        • _deleteShoppingList
        • _getShoppingListByAlias
      • Navigation
        • _getFooterMenu
        • _getHeaderMenu
      • Users
        • _getUserById
      • Utils
        • _calculateCurrency
        • _getCurrencySymbol
        • _getCulture
        • _subscribeToNewsletter
        • _findUnitsByIds
  • Noir
    • 0. Introduction
    • 6. FAQ
    • 1. Structure
      • _Overview
      • LayoutA.liquid
      • ComponentsList.liquid
      • Metas.liquid
      • CssVariables.liquid
      • Json.liquid
      • GoogleTagManager.liquid
      • StagingButton.liquid
    • 2. Components
      • _Overview
      • Announcement
      • BannerCarousel
      • BlogCategoryList
      • BlogHighlights
      • BlogList
      • BrandList
      • Breadcrumb
      • Cart
      • CategoriesList
      • ChangePassword
      • Checkout
      • CookieManager
      • CustomTable
      • Faq
      • FilterList
      • Footer
      • ForgotPassword
      • Form
      • IconBlock
      • Invitation
      • LastVisitedProducts
      • Login
      • Map
      • NavBar
      • Offer
      • ProductAttachments
      • ProductAttributes
      • ProductComparison
      • ProductDocumentation
      • ProductMixList
      • ProductsBlock
      • ProductsCarousel
      • ProductSingle
      • Profile
      • Quote
      • Register
      • RelatedProducts
      • SingleBlog
      • Stores
      • TextWithImage
      • ThankYouPage
      • TopBar
      • Wishlist
      • OrderReviews
      • ProductReviews
    • 3. Reusables
      • _Overview
      • Addresses
      • AddressForm
      • AnnouncementModal
      • BackToTop
      • BillingRetail
      • BlogPostingStructuredData
      • BrandListStructuredData
      • CollectionStructuredData
      • Company
      • General
      • GroupChildrenTable
      • Login
      • LoginModal
      • MonthlyTransactions
      • Offers
      • Orders
      • Payment
      • ProductAttachments
      • ProductAttributes
      • ProductAvailabilityAction
      • ProductComparisonButton
      • ProductComparisonFloatingButton
      • ProductGridItem
      • ProductGridItemClassic
      • ProductListItem
      • ProductModal
      • ProductStructuredData
      • ProfileInfo
      • PromptModal
      • Quotes
      • Register
      • Services
      • Shipping
      • ShoppingLists
      • ShoppingListsButton
      • ShoppingListsNavbar
      • StoresStructuredData
      • Toast
      • Transactions
      • Users
      • VariantContent
      • VariantContentClassic
      • WishlistButton
      • ProductRating
    • 4. Assets
      • Fonts
      • Images
      • Templates
      • Javascript
        • _Overview
        • theme.js
      • Css - Scss
        • _Overview
        • ThemeClasses
    • 5. SDK
      • _Overview
      • LiquidGlobals
      • ServicesSDK
  1. 2. Components

Map

Purpose#

The Map component embeds a map from an external provider (for example Google Maps or OpenStreetMap) in an <iframe>.
The merchant pastes the provider's embed code in the admin. The storefront keeps only the src of the first <iframe> in that code, so any other markup or script is ignored.

Configuring it in the admin#

SettingPurpose
ViewThe component view, Default.
Component nameThe name shown in the page builder.
Custom CSS classAdded to the component wrapper.
HeaderOptional title above the map. Also used as the iframe title.
AlignmentAlignment of the header: Left, Center or Right.
Embed codeThe map's embed HTML, pasted as-is.
To get the embed code from Google Maps: search for the place, choose Share > Embed a map, and copy the HTML.
The embed code is accepted when it contains an <iframe> whose src is an absolute https URL, or when it is just such a URL. Anything else renders no map, and the component outputs nothing.

Inputs (model contract)#

Model shape (storefront example)#

{
  "name": "Map",
  "view": "Default",
  "section": "SectionA",
  "embedUrl": "https://www.google.com/maps/embed?pb=...",
  "settings": {
    "embedCode": "<iframe src=\"https://www.google.com/maps/embed?pb=...\" width=\"600\" height=\"450\"></iframe>",
    "id": "Component Id",
    "type": "NoirMap",
    "view": "Default",
    "displayName": "",
    "cssClass": "",
    "header": "",
    "alignment": "Left"
  },
  "translations": {
    "map": "Sample text",
    "...": "..."
  }
}

Fields#

model.EmbedUrl
The validated https iframe source extracted from settings.embedCode. Empty when the embed code holds no usable URL; the component then renders nothing. Use this field rather than settings.embedCode, which is the raw, unvalidated text.
settings.id
Used for the wrapper id: comp-{{ id }}.
settings.cssClass
Applied only when non-empty and not (UNDEFINED).
settings.header
Rendered as a title above the map when provided.
settings.alignment
Sets the header alignment classes.
translations.map
Used as the iframe title when there is no header.

Template behavior (Liquid)#

Renders nothing when model.EmbedUrl is blank.
Otherwise renders the header (if any) and an <iframe> with the URL, filling a container 265px high on mobile and 440px from the lg breakpoint.
The iframe is lazy-loaded (loading="lazy") and allows full screen.
The section renders with a map--loading class, which covers the map area with a skeleton. The iframe's onload handler removes the class once the embedded map has loaded.
The component has no JavaScript.
Modified at 2026-10-20 10:39:37
Previous
Login
Next
NavBar
Built with