Website Embedding & Security
Embed interactive maps on Webflow, WordPress, Shopify, Next.js, or custom websites. Protect your visual assets with Allowed Origins domain whitelisting.
Installation Methods: Script vs. iframe
Layerpin provides two installation methods to publish interactive maps on any website, CMS, or web application with responsive layout and touch gesture support:
A self-initializing script tag that automatically measures container width, manages dynamic viewport height, and eliminates cumulative layout shift.
<script src="https://layerpin.com/embed.v1.js?map=emb_YOUR_MAP_ID&width=100%25&height=640px&minHeight=320px&border=none"></script>Standard sandboxed iframe snippet. Ideal for strict CMS environments, third-party sandboxes, and platforms that restrict external JavaScript tags.
<iframe
src="https://layerpin.com/embed/emb_YOUR_MAP_ID"
title="Interactive map"
loading="lazy"
referrerpolicy="strict-origin-when-cross-origin"
allow="fullscreen"
allowfullscreen
style="display:block;width:100%;height:640px;min-height:320px;border:0;"
></iframe>Direct URL Protection
Visiting the embed URL directly in a browser address bar is blocked by design. Layerpin requires a verified parent origin to render the map securely within an authorized embedding container.
Height Presets & Responsive Layout
Embeds always adapt to 100% of the parent container width. Choose from four standard height presets or specify custom pixel dimensions:
Ideal for sidebar columns, product detail widgets, and compact blog callouts.
The balanced default for landing pages, user guides, and directory listings.
Designed for multi-floor architectural blueprints, campus tours, and venue maps.
Fills the full browser screen on desktop and mobile for dedicated map explorer apps.
Loading Modes & Viewer Controls
Fine-tune viewer performance and interface controls for your target audience:
Lazy loading defers map initialization until visitors scroll near the container; eager loading loads immediately for hero sections.
Enables a fullscreen toggle button on the dock so visitors can inspect map details without leaving your page.
Toggle the platform attribution badge in the embedded viewer for a clean, white-labeled presentation.
Pass a language query parameter (e.g., ?lang=ja) in the embed source URL to pre-select regional dialects.
For camera initial framing, pitch, and compass orientation, see the Map Rendering Guide. For regional visitor translations, see Multi-Language Maps.
Allowed Origins & Domain Whitelisting
Domain whitelisting ensures your interactive maps only render on websites you authorize. Unauthorized third-party domains attempting to iframe your map receive an access-denied screen.
Origin Security Rules
- HTTPS Protocol Required: All embed origins require secure HTTPS connections. Enter domains with or without protocol (e.g., https://mycompany.com or mycompany.com).
- No Paths, Queries, or Hashes: Enter origin root domains only. Do not append subpaths or query strings (e.g., use https://store.example.com, not https://store.example.com/map?view=1).
- Wildcard Subdomain Matching (Premium): Add https://*.mycompany.com to authorize all staging branches, regional microsites, and preview deployments under a single rule.
- Strict Referrer Policy: Iframes must include referrerpolicy="strict-origin-when-cross-origin" so the browser transmits the parent origin header to our verification service.
Prerequisites to Enable Embedding
The map must be published and have at least one valid origin listed before website embedding can be toggled on.
Trial maps are private drafts and cannot be embedded publicly until an active map plan is selected.
Embed ID Revocation & Rotation
If an embed snippet is inadvertently committed to a public repository or an agency contract concludes, rotate your embed ID instantly:
In the live status rail on the right side of the Embed Configuration page, click Regenerate ID. Layerpin creates a new unique embed token (e.g., emb_...) immediately.
Multi-Device Live Preview
Test the embedded experience directly inside your Layerpin dashboard before publishing code changes to your live site:
Simulates standard desktop monitors and widescreen browser viewports at 100% width.
Tests iPad and tablet layouts with responsive slide-over drawers and category filter pills.
Validates touch navigation, mobile bottom sheets, and pinch-to-zoom on modern smartphones.
Map views generated within the dashboard Preview tab never consume your monthly plan view allowance.
Website Builders & CMS Guides
Layerpin interactive maps integrate seamlessly with all popular content management systems and site builders:
Embed responsive interactive maps into WordPress using Gutenberg Custom HTML blocks, Classic Editor, Elementor, or Divi HTML widgets.
Embed interactive maps in Webflow Designer using the Custom Code Embed element with full support for fluid responsive containers.
Embed full-width or fixed-dimension interactive maps in Wix Studio and Wix Editor using the HTML Embed element.
Install responsive interactive maps into Squarespace 7.1 and Fluid Engine sections using Code blocks.
Add interactive maps directly into Framer canvases using the native Embed component with fluid responsiveness.
Insert responsive interactive maps into Ghost CMS publications, member pages, and posts using HTML cards.
Detailed Tutorial
Need step-by-step screenshots for Webflow, WordPress, Wix, Squarespace, or Framer?
Origin Limits & Plan Capacity
Allowed origin capacity and wildcard support are determined by your active subscription plan:
| Plan | Allowed Origins | Wildcard Domains (*.) | Included Monthly Views | Published Maps |
|---|---|---|---|---|
| Trial | Private only | Not supported | Draft testing only | 0 (Draft only) |
| Basic | 10 origins | Not supported | 5,000 views | 3 maps |
| Pro | 25 origins | Not supported | 25,000 views | 15 maps |
| Premium | 50 origins | Supported | 100,000 views | 50 maps |