Javscript 4.0 API 용 ArcGIS API를 처음 사용했습니다. API 웹 사이트에서 방해석 샘플 사용. 기능 레이어에서지도보기 및 장면보기에 어디에서 추가 할 수 있습니까? 여기 방해석 맵 샘플 https://developers.arcgis.com/javascript/latest/sample-code/layers-featurelayer/index.htmlArcgis API for Javascript 4 방해석지도 추가 기능 레이어
/********************
* Add feature layer
********************/
// Carbon storage of trees in Warren Wilson College.
var featureLayer = new FeatureLayer({
url: "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Landscape_Trees/FeatureServer/0"
});
map.add(featureLayer);
: https://developers.arcgis.com/javascript/latest/sample-code/frameworks-bootstrap/index.html
을 이에 레이어를 추가 할 어떤 부분이 확실하지 않다 기본적으로 나는 여기에 기능 층 샘플 을 병합하기 위해 노력하고있어. 나는 몇 번이나 시도했다. 아래를 참조하십시오. 감사합니다
/******************************************************************
*
* Create the map and scene view and ui components
*
******************************************************************/
// Map
var map = new Map({
basemap: app.basemap
});
app.mapView = new MapView({
container: "mapViewDiv",
map: map,
center: app.center,
scale: app.scale,
padding: app.viewPadding,
popup: new Popup({
dockOptions: app.dockOptions
}),
ui: {
components: app.uiComponents
}
});
// Scene
var mapScene = new Map({
basemap: app.basemap,
ground: "world-elevation"
});
app.sceneView = new SceneView({
container: "sceneViewDiv",
map: mapScene,
center: app.center,
scale: app.scale,
padding: app.viewPadding,
popup: new Popup({
dockOptions: app.dockOptions
}),
ui: {
components: app.uiComponents
}
});
// Set the active view to scene
app.activeView = app.mapView;
// Create the search widget and add it to the navbar instead of view
app.searchWidget = new Search({
view: app.activeView
}, "searchWidgetDiv");
app.searchWidget.startup();
// IS THIS WHERE I CAN ADD LAYERS??????????????????
var featureLayer = new FeatureLayer({
url: "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Landscape_Trees/FeatureServer/0"
});
app.mapView.map.add(featureLayer);
app.sceneView.map.add(featureLayer);
이 게시물에 잘못된 것이 있으면 해당 정보를 제공하거나 정답을 제공하여 커뮤니티를 위해 업데이트 할 수 있도록하십시오. –