GeoLeaf Core API - v3.19.0
    Preparing search index...
    • Reads a theme's view off a profile.

      Parameters

      • raw: unknown

        The value of view, as parsed from the profile.

      Returns ThemeViewDeclaration | null

      The view in the form that applies — bounds when it holds two [lat, lng] corners, south-west then north-east, otherwise center with zoom — or null when neither form is usable: the theme then frames nothing.

      readThemeView({ bounds: [[43, 1], [44, 2]] }); // { bounds: [[43, 1], [44, 2]] }
      readThemeView({ center: [43.5, 1.5], zoom: 9 }); // { center: [43.5, 1.5], zoom: 9 }
      readThemeView({ center: [43.5, 1.5] }); // null — a centre needs its zoom