longdo-map-js

longdo-map-js is a skill for Claude Code, Codex from MetamediaTechnology/longdo-skills. It costs 103 tokens per session (3,897 once invoked), scanned A, original, Apache-2.0.

A reference for building browser-based maps with the Longdo Map v3 JavaScript API. It covers maps shown in a web page, including markers, popups, and map controls.

In plain words
What is it for?
Use it when writing or debugging Longdo web maps, such as adding markers, clustering locations, handling clicks, showing popups, controlling layers, or using geolocation. Server-side search, routing, geocoding, and traffic requests are outside its scope.
Why use it?
It explains common implementation patterns and less-obvious rendering problems that can make map features behave incorrectly.

Skill for Claude CodeCodex

Part of the longdo-map-js plugin — 1 skill shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/metamediatechnology/longdo-skills/longdo-map-js
Any agent
npx skills add MetamediaTechnology/longdo-skills --skill longdo-map-js
Clone the repo
git clone --depth 1 https://github.com/MetamediaTechnology/longdo-skills

Made for: Claude Code, Codex.

Or install longdo-map-js, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for longdo-map-js

README.md
[![agentmods](https://agentmods.dev/badge/skills/metamediatechnology/longdo-skills/longdo-map-js.svg)](https://agentmods.dev/skills/metamediatechnology/longdo-skills/longdo-map-js)
Your own site
<a href="https://agentmods.dev/skills/metamediatechnology/longdo-skills/longdo-map-js"><img src="https://agentmods.dev/badge/skills/metamediatechnology/longdo-skills/longdo-map-js.svg" alt="Measured on agentmods" height="20"></a>
Per session 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,897 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00103 $0.03897
Opus 5 $0.00051 $0.01948
Sonnet 5 $0.00021 $0.00779
Haiku 4.5 $0.00010 $0.00390

Measured 5d ago against content hash 9adf23181f24, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

longdo-map-js scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/longdo-map-js/skills/longdo-map-js/SKILL.md · 389 lines

How it starts

The opening of the file, as written. The whole thing — 389 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Longdo Map v3 JavaScript API — Tips & Tricks

Official docs: https://map.longdo.com/docs/javascript/ Get a free API key: https://map.longdo.com/console/

These are battle-tested patterns and non-obvious gotchas. Prefer them over naive approaches — several work around real quirks in the v3 renderer.

The Longdo Map v3 JavaScript API is built on top of MapLibre GL JS. The underlying MapLibre map instance is exposed as map.Renderer, so you can call any MapLibre method directly on it (e.g. map.Renderer.getStyle(), map.Renderer.setLayoutProperty(...), map.Renderer.on(...)) when the Longdo wrapper doesn't cover what you need.

Need server-side search, geocoding, routing, or traffic data? Those are REST calls — see the longdo-map-rest skill. This skill is the browser map only.


Loading the API and initialising a map

Include the script with your key, then create the map after the page and the API have loaded. Bind to the ready event before touching the map.

<!-- Never hard-code a real key in committed source. Inject it server-side
     or from an environment variable / config that is not in version control. -->
<script src="https://api.longdo.com/map3/?key=YOUR_API_KEY"></script>

<div id="map" style="width:100%;height:100%"></div>
<script>
  let map;
  window.onload = () => {
    map = new longdo.Map({
      placeholder: document.getElementById('map'),
      layer: [longdo.Layers.LIGHT],        // or longdo.Layers.NIGHT
      ui: longdo.UiComponent.MobileWithFullLayerSelector,
      lastView: true,                      // restore the user's last position
    });
    map.Event.bind('ready', init);
  };

  function init() {
    map.zoom(14);
    map.zoomRange({ min: 5, max: 20 });
    map.location({ lon: 100.5018, lat: 13.7563 }, true);
  }
</script>

Security: the key is exposed to the browser by design, but keep it out of your repo. Load it from an env var / server-side template and restrict the key to your domain(s) in the Longdo console.

Read the full file on GitHub · 389 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 389 lines · 103 tokens per session scan A 9adf23181f24

Subscribe to this mod's changes

longdo-map-js is a skill published in the GitHub repository MetamediaTechnology/longdo-skills (2 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 103 tokens to every session and 3,897 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

v8-jit

V8 JIT optimization patterns for writing high-performance JavaScript in Next.js server internals. Use when writing or reviewing hot-path code in app-render, stream-utils, routing, caching, or any per-request code path. Covers hidden classes / shapes, monomorphic call sites, inline caches, megamorphic deopt, closure…

vercel/next.js · 88 tokens

use-agent-browser-for-airi

Test AIRI display-model imports with agent-browser across stage-tamagotchi Electron, stage-web, and stage-pocket mobile web layouts. Use when uploading and verifying contributor-supplied Live2D ZIP, VRM, or MMD ZIP/PMX/PMD files through AIRI's model selector, including onboarding bypass, format-specific import…

moeru-ai/airi · 87 tokens

opencli-sitemap-author

Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.

jackwener/OpenCLI · 67 tokens

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

every-app/open-seo · 35 tokens

interactive-login

How to complete browser/interactive logins (aws / gh / glab / gcloud). The platform backgrounds the login poller so it survives the human's browser round-trip — and when that does NOT work.

yc-software/qm · 46 tokens