Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计提醒

arcgis-embeddable-mapsarcgis 可嵌入地图

Agent Skill

arcgis-embeddable-maps 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

396

周安装

17

GitHub Stars

13

下载量

139
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:arcgis-embeddable-maps(arcgis 可嵌入地图)
来源仓库:https://github.com/saschabrunnerch/arcgis-maps-sdk-js-ai-context
仓库路径:skills/arcgis-embeddable-maps
安装命令:
npx skills add https://github.com/saschabrunnerch/arcgis-maps-sdk-js-ai-context --skill arcgis-embeddable-maps
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/saschabrunnerch/arcgis-maps-sdk-js-ai-context --skill arcgis-embeddable-maps

简介

用于快速嵌入轻量级自包含地图到网页中。

  • 内置图例、书签、底图库等基础控件无需额外开发。
  • 采用 arcgis-embedded-map 单元素组件简化部署流程。
  • 适用于博客、报表等只读展示场景,不支持自定义交互逻辑。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

ArcGIS Embeddable Maps

Use this skill when embedding a lightweight, self-contained map into a web page with minimal code. The @arcgis/embeddable-components package provides the arcgis-embedded-map web component - a single element that bundles a WebMap viewer with optional built-in UI controls (legend, bookmarks, basemap gallery, fullscreen). This is a new component package in 5.0 with no 4.x equivalent.

When to use arcgis-embedded-map vs arcgis-map: Use arcgis-embedded-map for simple, read-only map embeds (blogs, dashboards, reports) where you don't need custom widgets, editing, or programmatic map control. Use arcgis-map (see arcgis-core-maps) for full-featured applications.

Import Patterns

CDN (No Build Tools)

<!-- Load ArcGIS Maps SDK -->
<script src="https://js.arcgis.com/5.0/"></script>
<!-- Load Embeddable Components -->
<script
  type="module"
  src="https://js.arcgis.com/5.0/embeddable-components/"
></script>

Direct ESM Imports (Build Tools)

import "@arcgis/embeddable-components/components/arcgis-embedded-map";

arcgis-embedded-map Component

Properties

PropertyAttributeTypeDefaultDescription
itemIditem-idstring-Required. Portal item ID of a WebMap
portalUrlportal-urlstring"https://www.arcgis.com"Portal URL (ArcGIS Online or Enterprise)
apiKeyapi-keystring-API key for accessing the resource
centercenter`number[] \Point`-View center [longitude, latitude]
zoomzoomnumber-Zoom level
scalescalestring-Map scale at center
extent-Extent-Visible map extent (set via JS)
webMap-WebMap-WebMap instance (set via JS, alternative to itemId)
themethemestring"light"Component theme: "light" or "dark"

UI Control Properties

PropertyAttributeTypeDefaultDescription
headingEnabledheading-enabledbooleanfalseShow the WebMap title
legendEnabledlegend-enabledbooleanfalseShow the legend panel
bookmarksEnabledbookmarks-enabledbooleanfalseShow bookmarks panel
basemapGalleryEnabledbasemap-gallery-enabledbooleanfalseShow basemap gallery panel
informationEnabledinformation-enabledbooleanfalseShow information panel
shareEnabledshare-enabledbooleanfalseShow button to open in Map Viewer
fullscreenDisabledfullscreen-disabledbooleanfalseDisable the fullscreen button
scrollEnabledscroll-enabledbooleantrueEnable mouse wheel scroll zooming
timeZoneLabelEnabledtime-zone-label-enabledbooleanfalseShow time zone labels

Methods

MethodReturnsDescription
componentOnReady()Promise<void>Resolves when the component is fully loaded

Basic Usage

Minimal Embed

<arcgis-embedded-map
  item-id="f2e9b762544945f390ca4ac3671cfa72"
  style="width: 800px; height: 600px;"
>
</arcgis-embedded-map>

Embed with All UI Controls

<arcgis-embedded-map
  item-id="f2e9b762544945f390ca4ac3671cfa72"
  heading-enabled
  legend-enabled
  bookmarks-enabled
  basemap-gallery-enabled
  information-enabled
  share-enabled
  style="width: 100%; height: 500px;"
>
</arcgis-embedded-map>

Dark Theme

<arcgis-embedded-map
  item-id="f2e9b762544945f390ca4ac3671cfa72"
  theme="dark"
  legend-enabled
  style="width: 800px; height: 600px;"
>
</arcgis-embedded-map>

Custom Center and Zoom

<arcgis-embedded-map
  item-id="f2e9b762544945f390ca4ac3671cfa72"
  center="-118.24,34.05"
  zoom="12"
  style="width: 800px; height: 600px;"
>
</arcgis-embedded-map>

Disable Scroll Zoom (For Inline Content)

<arcgis-embedded-map
  item-id="f2e9b762544945f390ca4ac3671cfa72"
  scroll-enabled="false"
  style="width: 100%; height: 400px;"
>
</arcgis-embedded-map>

With API Key

<arcgis-embedded-map
  item-id="YOUR_ITEM_ID"
  api-key="YOUR_API_KEY"
  portal-url="https://www.arcgis.com"
  legend-enabled
  style="width: 800px; height: 600px;"
>
</arcgis-embedded-map>

Enterprise Portal

<arcgis-embedded-map
  item-id="YOUR_ENTERPRISE_ITEM_ID"
  portal-url="https://your-enterprise.com/portal"
  heading-enabled
  legend-enabled
  style="width: 800px; height: 600px;"
>
</arcgis-embedded-map>

CDN Full Example

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Embedded Map</title>
    <script src="https://js.arcgis.com/5.0/"></script>
    <script
      type="module"
      src="https://js.arcgis.com/5.0/embeddable-components/"
    ></script>
    <style>
      body {
        font-family: sans-serif;
        max-width: 900px;
        margin: 0 auto;
        padding: 20px;
      }
      arcgis-embedded-map {
        width: 100%;
        height: 500px;
        display: block;
        margin: 20px 0;
      }
    </style>
  </head>
  <body>
    <h1>City Demographics</h1>
    <p>Explore population data across the region.</p>
    <arcgis-embedded-map
      item-id="f2e9b762544945f390ca4ac3671cfa72"
      heading-enabled
      legend-enabled
      bookmarks-enabled
      theme="light"
    >
    </arcgis-embedded-map>
    <p>Data source: US Census Bureau</p>
  </body>
</html>

Programmatic Configuration

Setting Extent via JavaScript

const embeddedMap = document.querySelector("arcgis-embedded-map");
await embeddedMap.componentOnReady();

embeddedMap.extent = {
  xmin: -118.5,
  ymin: 33.8,
  xmax: -117.9,
  ymax: 34.3,
  spatialReference: { wkid: 4326 },
};

Using a WebMap Instance

const WebMap = await $arcgis.import("@arcgis/core/WebMap.js");

const webMap = new WebMap({
  portalItem: { id: "f2e9b762544945f390ca4ac3671cfa72" },
});

const embeddedMap = document.querySelector("arcgis-embedded-map");
embeddedMap.webMap = webMap;

Theming with CSS Variables

The component supports Calcite Design System CSS variables:

arcgis-embedded-map {
  --calcite-color-brand: #007ac2;
  --calcite-color-foreground-1: #ffffff;
  --calcite-color-text-1: #151515;
  --calcite-color-border-1: #cacaca;
}

Common Pitfalls

  1. Missing item-id: The component requires a WebMap portal item ID. <!-- Anti-pattern: no item-id --> <arcgis-embedded-map style="width: 800px; height: 600px;"> </arcgis-embedded-map> <!-- Correct: provide item-id --> <arcgis-embedded-map item-id="f2e9b762544945f390ca4ac3671cfa72" style="width: 800px; height: 600px;" > </arcgis-embedded-map> Impact: The component renders an empty container with no map.
  2. Missing embeddable-components script: The package must be loaded separately. <!-- Anti-pattern: only loading core SDK --> <script src="https://js.arcgis.com/5.0/"></script> <arcgis-embedded-map item-id="abc123"></arcgis-embedded-map> <!-- Correct: load embeddable-components --> <script src="https://js.arcgis.com/5.0/"></script> <script type="module" src="https://js.arcgis.com/5.0/embeddable-components/" ></script> <arcgis-embedded-map item-id="abc123"></arcgis-embedded-map> Impact: The element is unrecognized and renders as empty.
  3. No explicit size: The embedded map needs width and height to render visibly. <!-- Anti-pattern: no size set --> <arcgis-embedded-map item-id="abc123"></arcgis-embedded-map> <!-- Correct: explicit dimensions --> <arcgis-embedded-map item-id="abc123" style="width: 100%; height: 500px; display: block;" > </arcgis-embedded-map> Impact: The map renders with zero height and is invisible on the page.
  4. Using arcgis-embedded-map for interactive apps: This component is designed for simple embeds. It does not support custom widgets, editing, layer manipulation, or programmatic view control. Use arcgis-map from @arcgis/map-components for full applications. Impact: Attempting to add widgets or edit features fails silently.
  5. Scroll zoom in long pages: When the embedded map is inline with scrollable content, scroll zoom can trap users. Disable it for better UX. <arcgis-embedded-map item-id="abc123" scroll-enabled="false" style="width: 100%; height: 400px;" > </arcgis-embedded-map> Impact: Users get stuck zooming the map when they want to scroll the page.

Reference Samples

  • Search for embedded map samples demonstrating lightweight WebMap embedding.

Related Skills

  • See arcgis-core-maps for full-featured map applications using arcgis-map and arcgis-scene.
  • See arcgis-starter-app for project scaffolding and CDN setup.
  • See arcgis-authentication for API key and portal authentication.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.96%
按下载量换算51

Claude

28.85%
按下载量换算40

Cursor

18.59%
按下载量换算26

Gemini CLI

8.59%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills