본문으로 건너뛰기

Viewer — 게시된 지도 임베드

product="viewer"는 게시된 Kaleidr 지도를 share id를 사용해 iframe에 임베드합니다. 자체 지도를 가지며 kaleidr-embed:* postMessage seam을 통해 제어합니다.

  • 통합 방식: iframe — 지도는 map-embed.kaleidr.com 내부에서 로드됩니다.
  • 필수 범위: 없음. Viewer는 keyless이며 share authorization이 credential입니다.
  • 최소 플랜: Free — share id를 가진 누구나 어떤 플랜에서든 Viewer를 임베드할 수 있습니다.

share-id필수입니다 — 생략하면 bundle 로드 시 오류가 발생합니다. Viewer embed에 publishable 키를 전달하면 product_not_allowed로 거부됩니다.

마운트

<kaleidr-map product="viewer" share-id="abcd1234"
center="-0.12,51.5" zoom="11" style="height:520px"></kaleidr-map>

Handle

const handle = Kaleidr.mount('#map', { product: 'viewer', shareId: 'abcd1234' });
handle.setCamera({ center: [-0.12, 51.5], zoom: 12, duration: 800 });
handle.destroy();

게시자가 설정한 allowed domains도 계속 적용됩니다 — 특정 사이트로 제한된 지도는 share id가 있어도 다른 곳에서 렌더링되지 않습니다. 지도 임베드를 참조하세요.