<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Map has whitespace when loading in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-has-whitespace-when-loading/m-p/1256467#M80209</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/655572"&gt;@UmbraVenus&lt;/a&gt;&amp;nbsp;, it looks like the white areas are present where the basemap is still requesting and or receiving basemap tiles from the server thru the internet.&amp;nbsp; Response and load times will vary based on internet speed.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Feb 2023 13:29:56 GMT</pubDate>
    <dc:creator>Sage_Wall</dc:creator>
    <dc:date>2023-02-09T13:29:56Z</dc:date>
    <item>
      <title>Map has whitespace when loading</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-has-whitespace-when-loading/m-p/1255798#M80184</link>
      <description>&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6319939470112w1558h540r825" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6319939470112" data-account="6161463677001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6161463677001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6319939470112w1558h540r825');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.esri.com/t5/video/gallerypage/video-id/6319939470112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hi, as you can see here, when i zoom in/out of a map, it sometimes render whitespace, and when I use the sketch layer output to generate a graphic layer(i.e add a graphic layer to the map) it takes a second to render while the screen is just white. I wonder what could be the cause and how should I fix it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And here is the code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;export default function geocodeConsistencyMap(): ReactElement {
    const initialGeoBound = {
        meter_geo: true,
        northmost: 90,
        westmost: -180,
        southmost: 10,
        eastmost: -50
    };

    const [geoBound, setGeoBound] = useState(initialGeoBound);

    const currentData = useMeterIDValidationQuery({
        body: geoBound
    });

    const [size, setSize] = useState&amp;lt;SizeType&amp;gt;('large');

    const graphicsLayer = new GraphicsLayer();

    const map = new Map({
        basemap: "streets-vector",
        layers: [graphicsLayer],
    });

    const view = new MapView({
        container: "viewDiv",
        map: map,
        zoom: 5,
        center: [-80,35]
    })

    const rectangleGeos = (rings) =&amp;gt; {
        let lats = []
        let lons = []
        rings = rings[0]
        for (let i=0; i&amp;lt;rings.length;i++) {
            
            lats.push(rings[i][1])
            lons.push(rings[i][0])
        }
 
        const drawnGeos = {
            meter_geo: true,
            northmost: Math.max(...lats),
            southmost: Math.min(...lats),
            westmost: Math.min(...lons),
            eastmost: Math.max(...lons)
        }
        console.log("drawn geos" + drawnGeos['northmost'])
        return drawnGeos
    }

    const getGeos = (data) =&amp;gt; {
        const markerLayer = new GraphicsLayer();
        if(!data){return ;}
        const result = []
        const  markerSymbol = {
            type: "simple-marker", // autocasts as new SimpleMarkerSymbol()
            color: [226, 119, 40],
            outline: {
                // autocasts as new SimpleLineSymbol()
                color: [255, 255, 255],
                width: 2
            }
        };

        data.forEach(element =&amp;gt; result.push(new Graphic({
            geometry:
                {
                    type: "point",
                    longitude: element.lat_lon.split(",")[1],
                    latitude: element.lat_lon.split(",")[0]
                },
            objectID: element.meter_id,
            symbol: markerSymbol,
            attributes: {
                lat_lon: element.lat_lon,
            }
        })))
        // Create a symbol for rendering the graphic
        try {
            const fillSymbol = {
                type: "simple-fill", // autocasts as new SimpleFillSymbol()
                color: [227, 139, 79, 0.8],
                outline: {
                    // autocasts as new SimpleLineSymbol()
                    color: [255, 255, 255],
                    width: 1
                }
            };
            const polygon = {
                type: "polygon",
                rings: rings.current['rings']
            }
            result.push({geometry: polygon, symbol: fillSymbol})
        } catch (e) {
        }
        result.forEach(element =&amp;gt; markerLayer.add(element));
        return markerLayer
    }

    let rings = useRef({'rings' :[
        [geoBound.westmost, geoBound.northmost],
        [geoBound.westmost, geoBound.southmost,],
        [geoBound.eastmost, geoBound.southmost,],
        [geoBound.eastmost, geoBound.northmost,],
        [geoBound.westmost, geoBound.northmost],
    ]})

    const sketch = new Sketch({
            layer: graphicsLayer,
            view: view,
            availableCreateTools: ['rectangle'],
            // graphic will be selected as soon as it is created
            creationMode: "single"
    });
    view.ui.add(sketch, "top-right");
    useEffect(() =&amp;gt; {
        sketch.on('create', (evt) =&amp;gt; {
            if (evt.state === 'complete') {
                graphicsLayer.remove(evt.graphic);
                rings.current = webMercatorUtils.webMercatorToGeographic(evt.graphic.geometry);
                
                const newGeoBound = rectangleGeos(rings.current['rings'])
                
                setGeoBound(newGeoBound);
                
                
            }
        })
    }, [sketch])

    map.add(getGeos(currentData.data?.invalid_geo.hits))

    return (
        &amp;lt;&amp;gt;
            &amp;lt;Row type="flex"&amp;gt;
                &amp;lt;Col flex="1 0 100%" span={24}&amp;gt;
                    &amp;lt;h6&amp;gt;Geocode Consistency: draw your geo-bounds here&amp;lt;/h6&amp;gt;
                    &amp;lt;Divider/&amp;gt;
                    &amp;lt;div id="viewDiv" style={{height: "60vh"}}&amp;gt;
                    &amp;lt;/div&amp;gt;
                    &amp;lt;Button type="primary" shape="round" icon={&amp;lt;DownloadOutlined /&amp;gt;} size={size}&amp;gt;
                        &amp;lt;CSVLink data={currentData.data?.invalid_geo.hits || "incomplete"} target="_blank" className={styles.download_report}&amp;gt;
                            Download Output
                        &amp;lt;/CSVLink&amp;gt;
                    &amp;lt;/Button&amp;gt;
                &amp;lt;/Col&amp;gt;
            &amp;lt;/Row&amp;gt;
        &amp;lt;/&amp;gt;
    );
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 17:48:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-has-whitespace-when-loading/m-p/1255798#M80184</guid>
      <dc:creator>UmbraVenus</dc:creator>
      <dc:date>2023-02-07T17:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: Map has whitespace when loading</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-has-whitespace-when-loading/m-p/1256467#M80209</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/655572"&gt;@UmbraVenus&lt;/a&gt;&amp;nbsp;, it looks like the white areas are present where the basemap is still requesting and or receiving basemap tiles from the server thru the internet.&amp;nbsp; Response and load times will vary based on internet speed.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 13:29:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-has-whitespace-when-loading/m-p/1256467#M80209</guid>
      <dc:creator>Sage_Wall</dc:creator>
      <dc:date>2023-02-09T13:29:56Z</dc:date>
    </item>
  </channel>
</rss>

