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

933
2
04-09-2019 12:11 AM
kawishabbas
Occasional Contributor

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

0 Kudos
2 Replies
EvelynHernandez
Occasional Contributor III
SouthWidget is the class you are loading in render, so.. what does SouthWidget contain?
SouthRegion should be rendered?
0 Kudos
kawishabbas
Occasional Contributor

South Widget contain map widgets like seach, Layerlist, BasemapGallery etc. But question is that why this code is running with Map?

0 Kudos