Layerpin logo
Integration

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:

Option 1: Installation Script
Recommended

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>
Best for: Webflow, WordPress, Framer, Ghost, and custom HTML templates.
Option 2: Responsive iframe

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>
Best for: Wix, Squarespace, Shopify, and strict React / Next.js sandboxes.
Figure 1: Layerpin Embed Installation tab with one-click Script and iframe code generators.

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:

Compact (560px, min 320px)

Ideal for sidebar columns, product detail widgets, and compact blog callouts.

Standard (640px, min 320px) — Default

The balanced default for landing pages, user guides, and directory listings.

Tall (720px, min 420px)

Designed for multi-floor architectural blueprints, campus tours, and venue maps.

Full Viewport (100dvh, min 240px)

Fills the full browser screen on desktop and mobile for dedicated map explorer apps.

Custom Pixel Dimensions: Select Custom height in the Layout dropdown to configure explicit values between 240 px and 1,600 px for both primary height and minimum height.

Loading Modes & Viewer Controls

Fine-tune viewer performance and interface controls for your target audience:

Lazy vs. Eager Loading

Lazy loading defers map initialization until visitors scroll near the container; eager loading loads immediately for hero sections.

Allow Fullscreen

Enables a fullscreen toggle button on the dock so visitors can inspect map details without leaving your page.

Layerpin Attribution

Toggle the platform attribution badge in the embedded viewer for a clean, white-labeled presentation.

Localized Embeds (?lang=)

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.

Figure 2: Configure domain whitelisting, layout height, viewer behavior, and embed ID status.

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:

Regenerating Your Embed ID

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.

Immediate Revocation: All existing installations referencing the revoked embed ID stop loading instantly. Update your website code blocks with the newly generated snippet.

Multi-Device Live Preview

Test the embedded experience directly inside your Layerpin dashboard before publishing code changes to your live site:

Figure 3: Multi-device interactive simulator for testing embeds across desktop, tablet, and mobile.
Desktop (100%)

Simulates standard desktop monitors and widescreen browser viewports at 100% width.

Tablet (768px)

Tests iPad and tablet layouts with responsive slide-over drawers and category filter pills.

Mobile (390px)

Validates touch navigation, mobile bottom sheets, and pinch-to-zoom on modern smartphones.

Quota-Free Previews

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:

WordPressInstallation script

Embed responsive interactive maps into WordPress using Gutenberg Custom HTML blocks, Classic Editor, Elementor, or Divi HTML widgets.

WebflowInstallation script

Embed interactive maps in Webflow Designer using the Custom Code Embed element with full support for fluid responsive containers.

WixIframe code

Embed full-width or fixed-dimension interactive maps in Wix Studio and Wix Editor using the HTML Embed element.

SquarespaceIframe code

Install responsive interactive maps into Squarespace 7.1 and Fluid Engine sections using Code blocks.

FramerInstallation script

Add interactive maps directly into Framer canvases using the native Embed component with fluid responsiveness.

GhostInstallation script or iframe

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:

PlanAllowed OriginsWildcard Domains (*.)Included Monthly ViewsPublished Maps
TrialPrivate onlyNot supportedDraft testing only0 (Draft only)
Basic10 originsNot supported5,000 views3 maps
Pro25 originsNot supported25,000 views15 maps
Premium50 originsSupported100,000 views50 maps