AnsweredAssumed Answered

Arcgis API failed to load (react-arcgis) with Scene

Question asked by kawish on Apr 9, 2019
Latest reply on Apr 10, 2019 by kawish

Hi,

I am using react-arcgis for React App. I want to use Scene instead of Map but API does not load with Scene while it works properly with Map module.

 

import React from 'react';
import { Scene } from 'react-arcgis';
//import { Scene } from '@esri/react-arcgis';
import { Row, Col } from 'reactstrap';
import './south.css'
import SouthWidget from './SouthWidget';

export default class SouthRegion extends React.Component{
    constructor(props) {
        super(props);
        this.state = {
            viewProperties: {
                center: [67.110382, 24.8776361],
                scale: 220000,
                popup: {
                    dockEnabled: true,
                    dockOptions: {
                        // Disables the dock button from the popup
                        buttonEnabled: false,
                        // Ignore the default sizes that trigger responsive docking
                        breakpoint: false,
                        position: "bottom-left"
                    }
                }

            }
        }
    }
 
    render(){
        return (
            <div className="page-wrapper">
                <div className="container-fluid">
                    <Row>
                        <Scene
                            className="scene__container"
                            style={{ width: '100vw', height: '90vh' }}
                            mapProperties={{ basemap: 'satellite' }}
                            viewProperties={this.state.viewProperties}
                    
                        >
                        <SouthWidget/>
                        </Scene>
                    </Row>
                </div>
              
            </div>
        ) 
    }
}

Error

Outcomes