geo-map-compliance-guard

Enforces China map data compliance rules when generating map visualization and location service code.

68|25|Updated Jul 24, 2026
One-click install
npx skills add https://github.com/rojim666/SztuCode --skill geo-map-compliance-guard-rojim666
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: geo-map-compliance-guard
Source: https://github.com/rojim666/SztuCode/tree/main/py-runtime/src/sztu_code/core/prompts/workbuddy/skills/geo-map-compliance-guard
Command: npx skills add https://github.com/rojim666/SztuCode --skill geo-map-compliance-guard-rojim666

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When generating map rendering, routing, or location service code, it is easy to accidentally use non-compliant map providers (Google Maps, Mapbox, OpenStreetMap), leak API keys in front-end code, or violate territorial and privacy regulations. This Skill enforces China map data compliance rules automatically on every map-related request. ## Core Features & Use Cases - Provider Whitelist Enforcement: Restricts map sources to Tencent Maps, AMap (Gaode), Baidu Maps, and NASG Tianditu, and automatically replaces non-compliant providers with compliant alternatives plus a full code solution. - Key Safety Controls: Prevents embedding real API keys in generated code; default scenario uses Tencent Maps GL JS with a local proxy (_TMapSecurityConfig) so zero keys are exposed on the front end, while non-default scenarios use an explicit placeholder key. - Compliance Self-Check: Verifies territorial integrity (national borders, Taiwan, South China Sea islands), prohibits marking sensitive sites, and enforces Personal Information Protection Law rules for location data. - Use Case: A user asks to build a store locator page with Google Maps. The Skill explains the compliance risk, then outputs a complete Tencent Maps GL JS implementation using the proxy template, and calls present_files to display the result. ## Quick Start Ask the agent to generate an interactive map page, for example: create an HTML map centered on Beijing with driving route planning between two points.

Frequently Asked Questions about geo-map-compliance-guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a compliant map to a web page in China?▼

Use a whitelisted provider such as Tencent Maps, AMap, Baidu Maps, or Tianditu. In the default scenario, load Tencent Maps GL JS from the official CDN without a key parameter and configure _TMapSecurityConfig so requests route through a local proxy.

Can I use Google Maps or OpenStreetMap for a China-facing website?▼

No. Google Maps, Apple Maps, Bing overseas, Mapbox, and OpenStreetMap direct tiles are non-compliant for China map services. The Skill explains the risk and replaces them with a compliant provider such as Tencent Maps, including complete working code.

How do I avoid leaking my Tencent Maps API key in front-end code?▼

Use the _TMapSecurityConfig key proxy mode: set serviceHost before loading the SDK and omit the key parameter from the SDK URL. For personal projects configure a Referer domain whitelist; commercial use should proxy key authentication through the back end.

Why does my Tencent Maps GL JS map render blank?▼

Common causes are a container without fixed height, calling TMap.setConfig together with _TMapSecurityConfig, or passing an unsupported mapStyleId. Give the container height: 100vh, use only the proxy config, and keep the default vector base map.

What coordinate system does Tencent Maps use?▼

Tencent Maps uses GCJ-02 (Mars coordinates), the standard coordinate system for compliant map services in China. Convert GPS WGS-84 coordinates to GCJ-02 before placing markers or drawing routes.