React Esri Maps から地理的画像を表示
IgrArcGISOnlineMapImagery は、Esri によって作成された無料の地理的画像マッピング サービスです。世界の地理的画像タイルの 40 スタイル以上を提供します。この地理的画像サービスは、www.arcgisonline.com に直接アクセスして利用できます。
React Esri Maps から地理的画像を表示の例
コード スニペット
以下のコード スニペットは、IgrArcGISOnlineMapImagery クラスを使用して IgrGeographicMap で Esri 画像サーバーからの React 地理的画像タイルを表示する方法を示します。
<IgrGeographicMap
ref={this.oceansMapRef}
height="100%"
width="100%"
zoomable={true} />
import { IgrGeographicMap, IgrArcGISOnlineMapImagery } from 'igniteui-react-maps';
// ...
private oceansMap: IgrGeographicMap
private oceansMapRef(r: IgrGeographicMap) {
this.oceansMap = r;
this.setState({});
}
this.oceansMapRef = this.oceansMapRef.bind(this);
var oceansMapImagery = new IgrArcGISOnlineMapImagery();
oceansMapImagery.mapServerUri = "https://services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer";
this.oceansMap.backgroundContent = oceansMapImagery;
Esri ユーティリティ
また、Esri 画像サーバーのすべてのスタイルを定義する EsriUtility を使用することもできます。
import { IgrGeographicMap } from 'igniteui-react-maps';
import { IgrArcGISOnlineMapImagery } from 'igniteui-react-maps';
import { EsriUtility, EsriStyle } from './EsriUtility';
// ...
const tileSource = new IgrArcGISOnlineMapImagery();
tileSource.mapServerUri = EsriUtility.getUri(EsriStyle.WorldOceansMap);
const geoMap = new IgrGeographicMap({ name: "geoMap" });
geoMap.backgroundContent = tileSource;
API リファレンス
IgrArcGISOnlineMapImagery
IgrGeographicMap