Skip to content

Variable: geoAttributes ​

ts
const geoAttributes: ObjectNode<{
  bgcolor: Attr<
    string,
    {
      description: 'Background color of the map, inside its frame.';
      dflt: '#fff';
      editType: 'plot';
    }
  >;
  center: ObjectNode<{
    lat: Attr<
      number,
      {
        description: 'Latitude at the middle of the subplot, in degrees. Defaults to the middle of `lataxis.range`.';
        editType: 'plot';
      }
    >;
    lon: Attr<
      number,
      {
        description: 'Longitude at the middle of the subplot, in degrees. Defaults to the middle of `lonaxis.range` on a scoped map and to `projection.rotation.lon` on a world map.';
        editType: 'plot';
      }
    >;
  }>;
  coastlinecolor: Attr<
    string,
    {
      description: 'Color of the coastlines.';
      dflt: '#444';
      editType: 'plot';
    }
  >;
  coastlinewidth: Attr<
    number,
    {
      description: 'Line width of the coastlines, px.';
      dflt: 1;
      editType: 'plot';
      min: 0;
    }
  >;
  countrycolor: Attr<
    string,
    {
      description: 'Color of the country borders.';
      dflt: '#444';
      editType: 'plot';
    }
  >;
  countrywidth: Attr<
    number,
    {
      description: 'Line width of the country borders, px.';
      dflt: 1;
      editType: 'plot';
      min: 0;
    }
  >;
  domain: ObjectNode<{
    column: Attr<
      number,
      {
        description: 'Column of the `layout.grid` cell this trace is placed in (0 = leftmost). Only used with a grid.';
        dflt: 0;
        editType: 'plot';
        min: 0;
      }
    >;
    row: Attr<
      number,
      {
        description: 'Row of the `layout.grid` cell this trace is placed in (0 = first row in `roworder`). Only used with a grid.';
        dflt: 0;
        editType: 'plot';
        min: 0;
      }
    >;
    x: AttrSpec<[number, number], [number, number]>;
    y: AttrSpec<[number, number], [number, number]>;
  }>;
  fitbounds: Attr<
    false | 'locations' | 'geojson',
    {
      description: "Fit the view to the data of the subplot's traces: `locations` to the points and locations they show, `geojson` to the whole of their `geojson`, `false` to leave the view as set. The fit sets `center` and `projection.scale`; on a world map also `projection.rotation.lon`, and with a clipped projection (`orthographic`, …) `projection.rotation.lat` and both axis ranges. It is off when the figure sets any of the attributes it would set, and for the projections it cannot fit (`albers usa`, `craig`, `peirce quincuncial`, `satellite`).";
      dflt: 'locations';
      editType: 'plot';
      values: readonly [false, 'locations', 'geojson'];
    }
  >;
  framecolor: Attr<
    string,
    {
      description: 'Color of the frame.';
      dflt: '#444';
      editType: 'plot';
    }
  >;
  framewidth: Attr<
    number,
    {
      description: 'Line width of the frame, px.';
      dflt: 1;
      editType: 'plot';
      min: 0;
    }
  >;
  lakecolor: Attr<
    string,
    {
      description: 'Fill color of the lakes.';
      dflt: '#3399FF';
      editType: 'plot';
    }
  >;
  landcolor: Attr<
    string,
    {
      description: 'Fill color of the land.';
      dflt: '#F0DC82';
      editType: 'plot';
    }
  >;
  lataxis: ObjectNode<{
    dtick: Attr<
      number,
      {
        description:
          | 'Step between the meridians, in degrees. Defaults to 10.'
          | 'Step between the meridians, in degrees. Defaults to 30.'
          | 'Step between the parallels, in degrees. Defaults to 10.'
          | 'Step between the parallels, in degrees. Defaults to 30.';
        editType: 'plot';
      }
    >;
    gridcolor: Attr<
      string,
      {
        description: 'Color of the meridians.' | 'Color of the parallels.';
        dflt: '#eee';
        editType: 'plot';
      }
    >;
    griddash: Attr<
      string,
      {
        description:
          | 'Dash style of the meridians: `solid`, `dot`, `dash`, `longdash`, `dashdot`, `longdashdot`, or a list of dash lengths in px (`5px,10px`).'
          | 'Dash style of the parallels: `solid`, `dot`, `dash`, `longdash`, `dashdot`, `longdashdot`, or a list of dash lengths in px (`5px,10px`).';
        dflt: 'solid';
        editType: 'plot';
      }
    >;
    gridwidth: Attr<
      number,
      {
        description: 'Line width of the meridians, px.' | 'Line width of the parallels, px.';
        dflt: 1;
        editType: 'plot';
        min: 0;
      }
    >;
    range: AttrSpec<[number, number], [number, number] | undefined>;
    showgrid: Attr<
      boolean,
      {
        description:
          'Draw the meridians of the graticule.' | 'Draw the parallels of the graticule.';
        dflt: false;
        editType: 'plot';
      }
    >;
    tick0: Attr<
      number,
      {
        description:
          | 'A longitude one of the meridians passes through, in degrees.'
          | 'A longitude one of the parallels passes through, in degrees.'
          | 'A latitude one of the meridians passes through, in degrees.'
          | 'A latitude one of the parallels passes through, in degrees.';
        dflt: 0;
        editType: 'plot';
      }
    >;
  }>;
  lonaxis: ObjectNode<{
    dtick: Attr<
      number,
      {
        description:
          | 'Step between the meridians, in degrees. Defaults to 10.'
          | 'Step between the meridians, in degrees. Defaults to 30.'
          | 'Step between the parallels, in degrees. Defaults to 10.'
          | 'Step between the parallels, in degrees. Defaults to 30.';
        editType: 'plot';
      }
    >;
    gridcolor: Attr<
      string,
      {
        description: 'Color of the meridians.' | 'Color of the parallels.';
        dflt: '#eee';
        editType: 'plot';
      }
    >;
    griddash: Attr<
      string,
      {
        description:
          | 'Dash style of the meridians: `solid`, `dot`, `dash`, `longdash`, `dashdot`, `longdashdot`, or a list of dash lengths in px (`5px,10px`).'
          | 'Dash style of the parallels: `solid`, `dot`, `dash`, `longdash`, `dashdot`, `longdashdot`, or a list of dash lengths in px (`5px,10px`).';
        dflt: 'solid';
        editType: 'plot';
      }
    >;
    gridwidth: Attr<
      number,
      {
        description: 'Line width of the meridians, px.' | 'Line width of the parallels, px.';
        dflt: 1;
        editType: 'plot';
        min: 0;
      }
    >;
    range: AttrSpec<[number, number], [number, number] | undefined>;
    showgrid: Attr<
      boolean,
      {
        description:
          'Draw the meridians of the graticule.' | 'Draw the parallels of the graticule.';
        dflt: false;
        editType: 'plot';
      }
    >;
    tick0: Attr<
      number,
      {
        description:
          | 'A longitude one of the meridians passes through, in degrees.'
          | 'A longitude one of the parallels passes through, in degrees.'
          | 'A latitude one of the meridians passes through, in degrees.'
          | 'A latitude one of the parallels passes through, in degrees.';
        dflt: 0;
        editType: 'plot';
      }
    >;
  }>;
  oceancolor: Attr<
    string,
    {
      description: 'Fill color of the oceans.';
      dflt: '#3399FF';
      editType: 'plot';
    }
  >;
  projection: ObjectNode<{
    distance: Attr<
      number,
      {
        description: "`satellite` only: distance of the viewpoint from the globe's center, in globe radii (above 1: outside the surface).";
        dflt: 2;
        editType: 'plot';
        min: 1.001;
      }
    >;
    maxscale: Attr<
      number,
      {
        description: 'Upper limit of zooming by hand, as a `projection.scale` value (2: in to twice the fitted size). Unset sets no limit.';
        editType: 'plot';
        min: 0;
      }
    >;
    minscale: Attr<
      number,
      {
        description: 'Lower limit of zooming by hand, as a `projection.scale` value (0.5: out to half the fitted size). 0 sets no limit.';
        dflt: 0;
        editType: 'plot';
        min: 0;
      }
    >;
    parallels: AttrSpec<[number, number], [number, number] | undefined>;
    rotation: ObjectNode<{
      lat: Attr<
        number,
        {
          description: 'Latitude at the center of the projection, in degrees north: tips the globe towards the viewer.';
          editType: 'plot';
        }
      >;
      lon: Attr<
        number,
        {
          description: 'Longitude at the center of the projection, in degrees east: turns the globe about its axis. Defaults to the middle of `lonaxis.range`.';
          editType: 'plot';
        }
      >;
      roll: Attr<
        number,
        {
          description: 'Turn of the map about the line of sight, in degrees (180 draws it upside down).';
          editType: 'plot';
        }
      >;
    }>;
    scale: Attr<
      number,
      {
        description: 'Zoom factor. At 1 the `lonaxis` / `lataxis` ranges are fitted into the domain.';
        dflt: 1;
        editType: 'plot';
        min: 0;
      }
    >;
    tilt: Attr<
      number,
      {
        description: '`satellite` only: tilt of the view away from straight down, in degrees.';
        dflt: 0;
        editType: 'plot';
      }
    >;
    type: Attr<
      ProjectionType,
      {
        description: "The map projection. Defaults to the scope's: `equirectangular` for the world, `albers usa` for `usa`, a conic or Mercator projection for the continents. The values are Plotly's, and `globe3d`, a Holochart extra: a 3D globe with the view of `orthographic`.";
        editType: 'plot';
        values: readonly ProjectionType[];
      }
    >;
  }>;
  resolution: Attr<
    50 | 110,
    {
      description: 'Detail of the base layers, as the scale denominator of the map data in millions: 110 (1:110,000,000, coarse) or 50 (1:50,000,000).';
      dflt: 110;
      editType: 'plot';
      values: readonly [110, 50];
    }
  >;
  rivercolor: Attr<
    string,
    {
      description: 'Color of the rivers.';
      dflt: '#3399FF';
      editType: 'plot';
    }
  >;
  riverwidth: Attr<
    number,
    {
      description: 'Line width of the rivers, px.';
      dflt: 1;
      editType: 'plot';
      min: 0;
    }
  >;
  scope: Attr<
    GeoScope,
    {
      description: 'The part of the world the base layers cover. A scope other than `world` also sets the default projection, ranges and rotation. `albers usa` maps are always `usa`.';
      dflt: 'world';
      editType: 'plot';
      values: GeoScope[];
    }
  >;
  showcoastlines: Attr<
    boolean,
    {
      description: 'Draw the coastlines. On by default on world maps.';
      editType: 'plot';
    }
  >;
  showcountries: Attr<
    boolean,
    {
      description: 'Draw the borders between countries. On by default on scoped maps other than `usa`.';
      editType: 'plot';
    }
  >;
  showframe: Attr<
    boolean,
    {
      description: 'Draw the outline of the projected globe. World maps only, where it is on by default.';
      editType: 'plot';
    }
  >;
  showlakes: Attr<
    boolean,
    {
      description: 'Fill the lakes.';
      dflt: false;
      editType: 'plot';
    }
  >;
  showland: Attr<
    boolean,
    {
      description: 'Fill the land.';
      dflt: false;
      editType: 'plot';
    }
  >;
  showocean: Attr<
    boolean,
    {
      description: 'Fill the oceans.';
      dflt: false;
      editType: 'plot';
    }
  >;
  showrivers: Attr<
    boolean,
    {
      description: 'Draw the rivers.';
      dflt: false;
      editType: 'plot';
    }
  >;
  showsubunits: Attr<
    boolean,
    {
      description: 'Draw the borders inside countries (states, provinces). The map data has them for `usa`, and for `north america` at `resolution` 50; on by default there, never drawn elsewhere.';
      editType: 'plot';
    }
  >;
  subunitcolor: Attr<
    string,
    {
      description: 'Color of the subunit borders.';
      dflt: '#444';
      editType: 'plot';
    }
  >;
  subunitwidth: Attr<
    number,
    {
      description: 'Line width of the subunit borders, px.';
      dflt: 1;
      editType: 'plot';
      min: 0;
    }
  >;
  uirevision: AttrSpec<unknown, unknown>;
  visible: Attr<
    boolean,
    {
      description: 'Default of the base layers and the graticule: `false` hides all of them (also those a template shows) unless the figure shows one itself.';
      dflt: true;
      editType: 'plot';
    }
  >;
}>;

Experimental

The geo subplot container family (geo, geo2, …).

Released under the MIT License.