tianditu-skill

star 2

Comprehensive guide and tools for developing with Tianditu (Sky Map) API. Use this skill when the user wants to integrate maps, geocoding, path planning, or other GIS features using Tianditu services.

fjdsjd By fjdsjd schedule Updated 2/5/2026

name: tianditu-skill description: Comprehensive guide and tools for developing with Tianditu (Sky Map) API. Use this skill when the user wants to integrate maps, geocoding, path planning, or other GIS features using Tianditu services.

Tianditu Skill

Overview

This skill provides documentation, code patterns, and templates for building applications with the Tianditu (天地图) JavaScript API v4.0. It covers map initialization, overlays, event handling, and web services like geocoding and driving directions.

When to Use

Use this skill when the user asks to:

  • "Show a map" using Tianditu.
  • "Get coordinates for an address" (Geocoding).
  • "Plan a route" (Driving/Walking).
  • "Show a 3D map" or "Add 3D markers".
  • "Add markers or polygons" to a map.
  • "Switch between Vector and Satellite maps".
  • "Convert coordinates" between GCJ02/BD09 and Tianditu.

Workflow

  1. Setup: Ensure the user has an API Key (tk). Refer to Guide.
  2. Implementation:
    • For basic map display, use the template in assets/map_template.html.
    • For 3D map display, use the template in assets/map_3d_template.html.
    • For adding markers/shapes, see API Reference.
    • For search/routing, see Services.

Resources

Documentation

Assets & Tools

Quick Snippets

Initialize Map

var map = new T.Map("mapDiv");
map.centerAndZoom(new T.Lnglat(116.40969, 39.89945), 12);

Add Marker

var marker = new T.Marker(new T.Lnglat(116.40969, 39.89945));
map.addOverLay(marker);

Geocoding

var geocoder = new T.Geocoder();
geocoder.getLocation(lnglat, function(result){ ... });
Install via CLI
npx skills add https://github.com/fjdsjd/TianDiTu-Skill --skill tianditu-skill
Repository Details
star Stars 2
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator