Skip to the content

Chizu地図

Draw SVG maps of the world, its 253 countries and the regions of 33 of them, frame them, place numbered callouts and build geography quizzes, with names in English and Japanese today (Spanish, German and Chinese are planned).

Chizu is the Japanese word 地図 for map. About the name

Contents

Reference · /world-geo-detail

ChizuGeoFeaturetype

One region or country as a GeoJSON feature, in WGS84 [longitude, latitude] degrees: a Polygon or MultiPolygon.

Import it

import type { ChizuGeoFeature } from "@johnmorrisdotca/chizu/world-geo-detail";

Also exported from: @johnmorrisdotca/chizu/divisions-geo

Definition

interface ChizuGeoFeature {
    type: "Feature";
    properties: ChizuGeoProperties;
    geometry: {
        type: "Polygon";
        coordinates: number[][][];
    } | {
        type: "MultiPolygon";
        coordinates: number[][][][];
    };
}

Members

NameTypeDescription
type"Feature"
propertiesChizuGeoProperties
geometry{ type: "Polygon"; coordinates: number[][][]; } | { type: "MultiPolygon"; coordinates: number[][][][]; }

Examples

import type { ChizuGeoFeature } from "@johnmorrisdotca/chizu/divisions-geo";

const feature: ChizuGeoFeature = {
  type: "Feature",
  properties: { code: "A", name: "A square" },
  geometry: { type: "Polygon", coordinates: [[[0, 0], [1, 0], [1, 1], [0, 0]]] },
};
console.log(feature.geometry.type, feature.geometry.coordinates[0].length);
// Polygon 4
Polygon 4

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/chizu 1.17.0.