# Function basemapToJson

- basemapToJson(basemap): BasemapJson & {
  origin?: "web-map" | "web-scene";
  portal?: {
  url: string;
  };
  }

- Serializes a basemap to JSON, using the correct origin for 3D basemaps.

  #### Parameters

  - basemap: Basemap

    The basemap to serialize.

  #### Returns BasemapJson & {
  origin?: "web-map" | "web-scene";
  portal?: {
  url: string;
  };
  }

  The JSON representation of the basemap.