Function setTileType

  • 航空衛星写真モードの切替と注記表示を制御する — 詳細な使用例

    TileType'satellite' に設定することで航空衛星写真(空撮)タイルを表示します。 通常地図タイルへの戻しは 'tile' を指定します。

    メソッド 用途
    setTileType('satellite') 航空衛星写真モードを有効化
    setTileType('tile') 通常地図タイルに戻す
    setSatelliteAnnotationVisible(true) 航空衛星写真上に地名・道路名を重ねて表示
    isSatelliteAnnotationVisible() 注記の表示状態を取得

    注意事項

    • setSatelliteAnnotationVisiblesetTileType('satellite') で衛星写真表示中のみ有効です。
    • 通常タイル表示中に setSatelliteAnnotationVisible を呼び出しても効果はありません。
    • 衛星写真サーバURLは AccessInformationsatelliteServerUrl で設定します。
    • setTileType('tile') に戻す際、3D表示方針がある場合は setMapVectorCondition を合わせて再適用します。

    Returns void

    Example: 航空衛星写真モードを有効化する

    import * as GIA from '@ntj/gaia';

    // 衛星写真で使うズームレンジを設定
    map.setZoomRange(new GIA.value.ZoomRange(6, 19));

    // 航空衛星写真モードに切替
    map.setTileType('satellite');

    // 注記(地名・道路名)を重ねて表示
    map.setSatelliteAnnotationVisible(true);

    // 現在の注記表示状態を確認
    const isVisible = map.isSatelliteAnnotationVisible();
    console.log(isVisible); // true

    Example: 通常地図タイルに戻す

    import * as GIA from '@ntj/gaia';

    // 通常タイルに戻す
    map.setTileType('tile');

    // 必要に応じて3D表示条件を再適用
    map.setMapVectorCondition(
    new GIA.value.MapVectorCondition({
    building3D: { enable: true, opacity: 0.8 },
    }),
    );

    Example: MapType状態を保持して切り替える

    import * as GIA from '@ntj/gaia';

    let currentMapType: 'map' | 'satellite' = 'map';

    const setMapType = (type: 'map' | 'satellite') => {
    currentMapType = type;
    if (type === 'satellite') {
    map.setTileType('satellite');
    return;
    }

    map.setTileType('tile');
    map.setMapVectorCondition(
    new GIA.value.MapVectorCondition({
    building3D: { enable: true, opacity: 0.8 },
    }),
    );
    };

    See