Instant Map

Instant Map / Styling

A map in your colours, from your style guide.

Give it the colours you already have. Instant Map works out land, water, roads, labels and markers from them, checks that text stays readable, and paints the first image and the live map the same way.

Try your brand

Start from a brand
Style guide colours
How much brand colour
Or a built-in theme
Then adjust any colour
Map you can restyle with the controls

Connected to your style guide

Keep one source of truth. Read the colours from the CSS custom properties your design system already defines, or from a design-token file on the server.

In the browser, from CSS tokens

/* Your style guide, as CSS custom properties */
:root {
  --primary: #e11d48;
  --background: #fff7ed;
  --foreground: #1c1917;
}

import { brandThemeFromCss } from "instantmap-js/brand";

// Reads the same tokens the rest of your page uses.
const brand = brandThemeFromCss({
  primary: "--primary",
  background: "--background",
  foreground: "--foreground",
});

const map = document.querySelector("instant-map");
map.theme = brand.theme;
map.colors = brand.colors;

On the server, from a token file

import { brandTheme, staticUrl } from "instantmap-js/server";
import tokens from "./design-tokens.json";

// On the server, so the first image is already in your colours.
export const brand = brandTheme({
  primary: tokens.color.primary,
  background: tokens.color.background,
  foreground: tokens.color.foreground,
});

const poster = staticUrl({
  center: [-122.42, 37.77], zoom: 12,
  width: 960, height: 540,
  ...brand,
});

As much control as you want

Theming guide