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
import * as GIA from '@ntj/gaia';
// 通常タイルに戻す
map.setTileType('tile');
// 必要に応じて3D表示条件を再適用
map.setMapVectorCondition(
new GIA.value.MapVectorCondition({
building3D: { enable: true, opacity: 0.8 },
}),
);
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 },
}),
);
};
航空衛星写真モードの切替と注記表示を制御する — 詳細な使用例
TileTypeを'satellite'に設定することで航空衛星写真(空撮)タイルを表示します。 通常地図タイルへの戻しは'tile'を指定します。setTileType('satellite')setTileType('tile')setSatelliteAnnotationVisible(true)isSatelliteAnnotationVisible()注意事項
setSatelliteAnnotationVisibleはsetTileType('satellite')で衛星写真表示中のみ有効です。setSatelliteAnnotationVisibleを呼び出しても効果はありません。AccessInformationのsatelliteServerUrlで設定します。setTileType('tile')に戻す際、3D表示方針がある場合はsetMapVectorConditionを合わせて再適用します。