<?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: Wep Map is not loading in ArcGIS for Power BI Questions</title>
    <link>https://community.esri.com/t5/arcgis-for-power-bi-questions/wep-map-is-not-loading/m-p/1617685#M2216</link>
    <description>&lt;P&gt;I am having a similar issue...causing all but one ArcGIS map to not meet requirements even though they all got green checks for validation.&lt;/P&gt;&lt;P&gt;la.arcgis.com/powerbi/2024_2/nls/app-en-us.json:1&lt;BR /&gt;Failed to load resource: the server responded with a status of 404 ()&lt;/P&gt;&lt;P&gt;la.arcgis.com/crl/2025.1.2/nls/common-en-us.json:1&lt;BR /&gt;Failed to load resource: the server responded with a status of 404 ()&lt;/P&gt;&lt;P&gt;la.arcgis.com/crl/2025.1.2/nls/cldr-en-us.json:1&lt;BR /&gt;Failed to load resource: the server responded with a status of 404 ()&lt;/P&gt;</description>
    <pubDate>Thu, 22 May 2025 17:43:01 GMT</pubDate>
    <dc:creator>luckachi</dc:creator>
    <dc:date>2025-05-22T17:43:01Z</dc:date>
    <item>
      <title>Wep Map is not loading</title>
      <link>https://community.esri.com/t5/arcgis-for-power-bi-questions/wep-map-is-not-loading/m-p/1501459#M1891</link>
      <description>&lt;P&gt;&lt;STRONG&gt;ArcGIS webmap is not loading on PowerBi report server. It throws below error on inspect page&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;la.arcgis.com/crl/2024.1.1/nls/cldr-en-us.json:1&lt;BR /&gt;Failed to load resource: the server responded with a status of 404 ()&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;la.arcgis.com/crl/2024.1.1/nls/common-en-us.json:1&lt;BR /&gt;Failed to load resource: the server responded with a status of 404 ()&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;la.arcgis.com/powerbi/2024_1/nls/app-en-us.json:1&lt;BR /&gt;Failed to load resource: the server responded with a status of 404 ()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And after refreshing the page map is loading and popup the error "and errCannot destructure property 'user' of 'e' as it is null."&amp;nbsp; Could anyone help me to fix the issue?.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Isakki&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2024 07:07:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-for-power-bi-questions/wep-map-is-not-loading/m-p/1501459#M1891</guid>
      <dc:creator>banu</dc:creator>
      <dc:date>2024-07-04T07:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: Wep Map is not loading</title>
      <link>https://community.esri.com/t5/arcgis-for-power-bi-questions/wep-map-is-not-loading/m-p/1506665#M1939</link>
      <description>&lt;P&gt;Me and some colleagues are having the same issue.&amp;nbsp; Did you solve the problem?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 14:45:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-for-power-bi-questions/wep-map-is-not-loading/m-p/1506665#M1939</guid>
      <dc:creator>rber</dc:creator>
      <dc:date>2024-07-18T14:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Wep Map is not loading</title>
      <link>https://community.esri.com/t5/arcgis-for-power-bi-questions/wep-map-is-not-loading/m-p/1617685#M2216</link>
      <description>&lt;P&gt;I am having a similar issue...causing all but one ArcGIS map to not meet requirements even though they all got green checks for validation.&lt;/P&gt;&lt;P&gt;la.arcgis.com/powerbi/2024_2/nls/app-en-us.json:1&lt;BR /&gt;Failed to load resource: the server responded with a status of 404 ()&lt;/P&gt;&lt;P&gt;la.arcgis.com/crl/2025.1.2/nls/common-en-us.json:1&lt;BR /&gt;Failed to load resource: the server responded with a status of 404 ()&lt;/P&gt;&lt;P&gt;la.arcgis.com/crl/2025.1.2/nls/cldr-en-us.json:1&lt;BR /&gt;Failed to load resource: the server responded with a status of 404 ()&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 17:43:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-for-power-bi-questions/wep-map-is-not-loading/m-p/1617685#M2216</guid>
      <dc:creator>luckachi</dc:creator>
      <dc:date>2025-05-22T17:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Wep Map is not loading</title>
      <link>https://community.esri.com/t5/arcgis-for-power-bi-questions/wep-map-is-not-loading/m-p/1655755#M2296</link>
      <description>&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;let filterValues;&lt;BR /&gt;let view, buildinglayer, layer1, layer2, layer3, layer4, searchWidget, sources, searchContainer, renderer, results, orgListjson, legend, isSingle;&lt;BR /&gt;let featureLayerView, DivisionIds, GroupIds, DeptIds;&lt;BR /&gt;const attributeField = "URECD.URFloor2.ORGN_CD";&lt;/P&gt;&lt;P&gt;const [MapView, Map, FeatureLayer, ImageryLayer, GraphicsLayer, Graphic, geometryEngine, Search, Home, Expand, SketchViewModel, geometryEngineAsync, LayerList, AreaMeasurement2D, Legend] = await $arcgis.import([&lt;BR /&gt;"@arcgis/core/views/MapView.js", "@arcgis/core/Map.js", "@arcgis/core/layers/FeatureLayer.js", "@arcgis/core/layers/ImageryLayer.js",&lt;BR /&gt;"@arcgis/core/layers/GraphicsLayer.js", "@arcgis/core/Graphic.js", "@arcgis/core/geometry/geometryEngine.js", "@arcgis/core/widgets/Search.js",&lt;BR /&gt;"@arcgis/core/widgets/Home.js", "@arcgis/core/widgets/Expand.js", "@arcgis/core/widgets/Sketch/SketchViewModel", "@arcgis/core/geometry/geometryEngineAsync.js",&lt;BR /&gt;"@arcgis/core/widgets/LayerList.js", "@arcgis/core/widgets/AreaMeasurement2D.js", "@arcgis/core/widgets/Legend.js"&lt;BR /&gt;]);&lt;/P&gt;&lt;P&gt;import { HRconfigLayersFloor2, HRconfigLayersFloor1 } from '/js/renderer.js';&lt;/P&gt;&lt;P&gt;export async function renderMap(FloorNumber, orgList) {&lt;BR /&gt;const mapImage = document.getElementById("map-image");&lt;BR /&gt;const loader = document.getElementById("loader");&lt;BR /&gt;if (mapImage) {&lt;BR /&gt;mapImage.style.display = "block";&lt;BR /&gt;}&lt;BR /&gt;if (loader) {&lt;BR /&gt;loader.style.display = "flex";&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;const map = new Map({&lt;BR /&gt;//basemap: "satellite"&lt;BR /&gt;});&lt;BR /&gt;view = new MapView({&lt;BR /&gt;container: "view-div",&lt;BR /&gt;map: map,&lt;BR /&gt;center: [50.121830, 26.313973],&lt;BR /&gt;zoom: 21,&lt;BR /&gt;ui: {&lt;BR /&gt;components: ["attribution"],&lt;BR /&gt;},&lt;BR /&gt;spatialReferenceLocked: true,&lt;BR /&gt;popup: {&lt;BR /&gt;dockOptions: { // Dock the popup to the top of the map&lt;BR /&gt;buttonEnabled: false&lt;BR /&gt;},&lt;BR /&gt;visibleElements: { closeButton: false, collapseButton: false, heading: false, actionBar: false }&lt;BR /&gt;} // longitude, latitude,&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;view.on("mouse-wheel", (event) =&amp;gt; {&lt;BR /&gt;event.stopPropagation();&lt;BR /&gt;});&lt;BR /&gt;view.on("double-click", ["Control"], (event) =&amp;gt; {&lt;BR /&gt;event.stopPropagation();&lt;BR /&gt;});&lt;BR /&gt;view.on("double-click", (event) =&amp;gt; {&lt;BR /&gt;event.stopPropagation();&lt;BR /&gt;});&lt;BR /&gt;view.on("key-down", (event) =&amp;gt; {&lt;BR /&gt;const prohibitedKeys = ["+", "-", "Shift", "_", "="];&lt;BR /&gt;const keyPressed = event.key;&lt;BR /&gt;if (prohibitedKeys.indexOf(keyPressed) !== -1) {&lt;BR /&gt;event.stopPropagation();&lt;BR /&gt;}&lt;BR /&gt;});&lt;BR /&gt;view.on("drag", (event) =&amp;gt; {&lt;BR /&gt;event.stopPropagation();&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;const template = {&lt;BR /&gt;title: "{LOCATION}",&lt;BR /&gt;content: [&lt;BR /&gt;{&lt;BR /&gt;type: "text",&lt;BR /&gt;/*text: "&amp;lt;div style='display: flex; flex-direction: row;'&amp;gt;&amp;lt;img src='{URECD.Floor2BuilPlan_1.PICTURE}' style='width: 20%; height: auto; margin-right: 10px;'/&amp;gt;&amp;lt;p style='color: #384A66; font-family: Roboto; font-size: 14px; font-style: normal; font-weight: 500; line-height: 16px;'&amp;gt;{ URECD.URFloor2.FULL_NAME }&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;{ URECD.URFloor2.ORGN_NAME }&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;"*/&lt;BR /&gt;text: "&amp;lt;div style='display: flex; flex-direction: row; margin-top: 6px;'&amp;gt;&amp;lt;img src='{URECD.Floor2BuilPlan_1.PICTURE}' style ='width: 50px !important; height:50px !important; margin-right:10px;'&amp;gt;&amp;lt;div style='display: flex;flex-direction: column;align-items: flex-start;justify-content: center;gap : 1;justify-items: start;/* column-gap: 3px; */gap: 4px;'&amp;gt;&amp;lt;span style='display: block; color:#384A66; font-family:Roboto; font-size:14px; font-style:normal; font-weight:500; line-height:16px;'&amp;gt;{URECD.URFloor2.FULL_NAME}&amp;lt;/span&amp;gt;&amp;lt;span style='color: var(--Grayscale-Gr4, #6B7F9E); font-family: Roboto; font-size: 12px; font-style: normal; font-weight: 400; line-height: 16px;'&amp;gt;{URECD.URFloor2.ORGN_NAME}&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt; "&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;};&lt;BR /&gt;const configLayers = getHRconfigLayers(FloorNumber);&lt;/P&gt;&lt;P&gt;buildinglayer = new FeatureLayer({&lt;BR /&gt;url: configLayers.find((layer) =&amp;gt; layer.id === "buildinglayer").url,&lt;BR /&gt;outFields: ['*']&lt;BR /&gt;});&lt;BR /&gt;layer1 = new FeatureLayer({&lt;BR /&gt;url: configLayers.find((layer) =&amp;gt; layer.id === "layer1").url,&lt;BR /&gt;outFields: ["*"]&lt;BR /&gt;});&lt;BR /&gt;layer2 = new FeatureLayer({&lt;BR /&gt;url: configLayers.find((layer) =&amp;gt; layer.id === "layer2").url,&lt;BR /&gt;outFields: ["*"]&lt;BR /&gt;});&lt;BR /&gt;layer3 = new FeatureLayer({&lt;BR /&gt;url: configLayers.find((layer) =&amp;gt; layer.id === "layer3").url&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;// Create unique value infos&lt;BR /&gt;map.add(buildinglayer, 0);&lt;BR /&gt;map.add(layer1, 1);&lt;BR /&gt;map.add(layer2, 2);&lt;BR /&gt;map.add(layer3, 3);&lt;BR /&gt;// map.add(layer4, 4);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let activelayer = buildinglayer;&lt;/P&gt;&lt;P&gt;view.when(() =&amp;gt; {&lt;BR /&gt;rendervalue(orgList);&lt;BR /&gt;searchContainer = document.getElementById("search");&lt;BR /&gt;// console.log(searchContainer); // Check if the element is being found&lt;BR /&gt;var searchFieldsString = ["URECD.URFloor2.FULL_NAME"];&lt;/P&gt;&lt;P&gt;if (searchContainer) {&lt;BR /&gt;sources = [&lt;BR /&gt;{&lt;BR /&gt;layer: buildinglayer,&lt;BR /&gt;searchFields: ["URECD.URFloor2.FULL_NAME"], // Fields to search within&lt;BR /&gt;displayField: "URECD.URFloor2.FULL_NAME", // Field to display in suggestions&lt;BR /&gt;exactMatch: false,&lt;BR /&gt;outFields: ["*"],&lt;BR /&gt;name: "Employee Location Search",&lt;BR /&gt;placeholder: "Search by Name",&lt;BR /&gt;getSuggestions: function (params) {&lt;BR /&gt;const suggestTerm = params.suggestTerm.toLowerCase();&lt;BR /&gt;const query = {&lt;BR /&gt;where: `LOWER(URECD.URFloor2.FULL_NAME) LIKE '%${suggestTerm}%'`,&lt;BR /&gt;outFields: "URECD.URFloor2.FULL_NAME",&lt;BR /&gt;returnGeometry: true,&lt;BR /&gt;f: "json"&lt;BR /&gt;};&lt;BR /&gt;return buildinglayer.queryFeatures(query).then(function (response) {&lt;BR /&gt;return response.features.map(function (feature) {&lt;BR /&gt;return {&lt;BR /&gt;text: feature.attributes["URECD.URFloor2.FULL_NAME"],&lt;BR /&gt;key: feature.attributes["URECD.URFloor2.FULL_NAME"],&lt;BR /&gt;sourceIndex: params.sourceIndex&lt;BR /&gt;};&lt;BR /&gt;});&lt;BR /&gt;});&lt;BR /&gt;},&lt;BR /&gt;getResults: function (params) {&lt;BR /&gt;const query = {&lt;BR /&gt;where: `URECD.URFloor2.FULL_NAME = '${params.suggestResult.text}'`,&lt;BR /&gt;outFields: ["*"],&lt;BR /&gt;returnGeometry: true,&lt;BR /&gt;f: "json"&lt;BR /&gt;};&lt;BR /&gt;return buildinglayer.queryFeatures(query).then(function (response) {&lt;BR /&gt;const features = response.features;&lt;BR /&gt;if (features.length &amp;gt; 0) {&lt;BR /&gt;view.popup.open({&lt;BR /&gt;features: features,&lt;BR /&gt;location: features[0].geometry.centroid&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;return features;&lt;BR /&gt;});&lt;BR /&gt;},&lt;BR /&gt;suggestionsEnabled: true, // Enable suggestions // Display both fields in suggestions&lt;BR /&gt;minCharacters: 3, // Minimum characters required to trigger suggestions&lt;BR /&gt;maxResults: 5, // Maximum number of suggestions to display&lt;BR /&gt;searchDelay: 500&lt;BR /&gt;}&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;searchWidget = new Search({&lt;BR /&gt;view: view, sources: sources, container: "search", locationEnabled: false, includeDefaultSources: false, zoomScale: null,&lt;BR /&gt;goToOverride: (view, goToOverrideParameters) =&amp;gt; { // view.goTo({ target: goToOverrideParameters.target, zoom: 15 });&lt;BR /&gt;}&lt;BR /&gt;});//default search widget&lt;/P&gt;&lt;P&gt;// console.log(searchWidget); // Check if the search widget is being created&lt;BR /&gt;} else {&lt;BR /&gt;console.error("Search container element not found"); // Log an error if the element is not found&lt;BR /&gt;}&lt;BR /&gt;view.on("click", (event) =&amp;gt; {&lt;BR /&gt;view.hitTest(event).then((response) =&amp;gt; {&lt;BR /&gt;const results = response.results.filter((r) =&amp;gt; r.graphic.layer === activelayer);&lt;BR /&gt;if (results.length &amp;gt; 0) {&lt;BR /&gt;const graphic = results[0].graphic;&lt;/P&gt;&lt;P&gt;if (graphic.attributes["URECD.Floor2BuilPlan_1.NETWORKID"] !== null &amp;amp;&amp;amp; graphic.attributes["URECD.URFloor2.FULL_NAME"] !== null) {&lt;BR /&gt;buildinglayer.popupTemplate = template;&lt;BR /&gt;view.popup.open({&lt;BR /&gt;features: [graphic],&lt;BR /&gt;location: event.mapPoint&lt;BR /&gt;});&lt;BR /&gt;sendDataToDotNet(graphic.attributes);&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;view.popupEnabled = false;&lt;BR /&gt;hidePopup();&lt;BR /&gt;}&lt;BR /&gt;//sendDataToDotNet(graphic.attributes);&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;view.closePopup()&lt;BR /&gt;return;&lt;BR /&gt;}&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;//buildinglayer.popupTemplate = template;&lt;BR /&gt;view.on("pointer-move", async (event) =&amp;gt; {&lt;BR /&gt;if (searchWidget.searchTerm) {&lt;BR /&gt;return;&lt;BR /&gt;}&lt;BR /&gt;const screenPoint = { x: event.x, y: event.y };&lt;BR /&gt;const hitTestResult = await view.hitTest(screenPoint, {&lt;BR /&gt;include: [buildinglayer]&lt;BR /&gt;});&lt;BR /&gt;const feature = hitTestResult.results.find(result =&amp;gt; {&lt;BR /&gt;return result.graphic &amp;amp;&amp;amp; result.graphic.layer === buildinglayer;&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;buildinglayer.popupTemplate = template;&lt;BR /&gt;if (feature) {&lt;BR /&gt;if (feature &amp;amp;&amp;amp; feature.graphic.attributes["URECD.URFloor2.FULL_NAME"] !== null &amp;amp;&amp;amp; feature.graphic.attributes["URECD.URFloor2.FULL_NAME"] !== "") {&lt;BR /&gt;view.popup.open({&lt;BR /&gt;features: [feature.graphic],&lt;BR /&gt;location: event.mapPoint,&lt;BR /&gt;featureMenuOpen: false // Optional: prevent context menu from opening&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;view.closePopup()&lt;BR /&gt;}&lt;BR /&gt;});&lt;BR /&gt;});&lt;BR /&gt;await view.watch("updating", (updating) =&amp;gt; {&lt;BR /&gt;if (!updating) {&lt;BR /&gt;// This function will execute once the map stops updating (is fully loaded/rendered)&lt;BR /&gt;console.log("Map is fully loaded and stationary.");&lt;BR /&gt;mapImage.style.display = "none";&lt;BR /&gt;loader.style.display = "none";&lt;BR /&gt;const viewDiv = document.getElementById("view-div");&lt;BR /&gt;if (viewDiv) {&lt;BR /&gt;viewDiv.style.opacity = 1;&lt;BR /&gt;} else {&lt;BR /&gt;console.error("view-div element was not found.");&lt;BR /&gt;// You can also add additional error handling or fallback behavior here&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;});&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;export async function filterMapfeatures(FloorNumber, divisionIds, groupIds, deptIds, FilteredorgList) {&lt;BR /&gt;rendervalue(FilteredorgList);&lt;BR /&gt;const orgList = JSON.parse(FilteredorgList);&lt;BR /&gt;DivisionIds = `'${divisionIds.join("','")}'`;&lt;BR /&gt;GroupIds = `'${groupIds.join("','")}'`;&lt;BR /&gt;DeptIds = deptIds;&lt;BR /&gt;const combinedIds = divisionIds.concat(groupIds);&lt;BR /&gt;const combineddeptIds = combinedIds.concat(DeptIds);&lt;BR /&gt;const combinedIdsString = `'${combineddeptIds.join("','")}'`;&lt;/P&gt;&lt;P&gt;if (DivisionIds != "" &amp;amp;&amp;amp; DivisionIds.length &amp;gt; 0 &amp;amp;&amp;amp; GroupIds != "" &amp;amp;&amp;amp; GroupIds.length &amp;gt; 0) {&lt;BR /&gt;const query = {&lt;BR /&gt;where: "URECD.URFloor2.ORGN_CD NOT IN (" + combinedIdsString + ")",&lt;BR /&gt;returnGeometry: true,&lt;BR /&gt;outFields: ["*"]&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;const results = await buildinglayer.queryFeatures(query);&lt;BR /&gt;addGraphicsdata(results);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;export async function CancelfilterMapfeatures(FloorNumber, divisionIds, groupIds, deptIds, FilteredorgList) {&lt;BR /&gt;rendervalue(FilteredorgList);&lt;BR /&gt;view.graphics.removeAll();&lt;BR /&gt;}&lt;BR /&gt;function addGraphicsdata(results) {&lt;BR /&gt;view.graphics.removeAll();&lt;BR /&gt;if (results.features.length &amp;gt; 0) {&lt;BR /&gt;let symbol;&lt;BR /&gt;switch (results.features[0].geometry.type) {&lt;BR /&gt;case "point": symbol = {&lt;BR /&gt;type: "simple-marker",&lt;BR /&gt;color: "#17CBE8",&lt;BR /&gt;size: 10,&lt;BR /&gt;}; break;&lt;BR /&gt;case "polygon": symbol = {&lt;BR /&gt;type: "simple-fill",&lt;BR /&gt;color: "#CFD8E6",&lt;BR /&gt;opacity: 0.7,&lt;BR /&gt;outline: {&lt;BR /&gt;color: [0, 255, 0, 1],&lt;BR /&gt;width: "0px"&lt;BR /&gt;}&lt;BR /&gt;};&lt;BR /&gt;}&lt;BR /&gt;var graphics = results.features.map((feature) =&amp;gt; {&lt;BR /&gt;let graphic = new Graphic();&lt;BR /&gt;graphic.geometry = feature.geometry;&lt;BR /&gt;graphic.symbol = symbol;&lt;BR /&gt;return graphic;&lt;BR /&gt;});&lt;BR /&gt;view.graphics.addMany(graphics);&lt;BR /&gt;// view.goTo(graphics);&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;// Clear the graphics in the layer if the query is empty&lt;BR /&gt;view.graphics.removeAll();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;async function highlightOtherFeatures(results) {&lt;/P&gt;&lt;P&gt;const allFeaturesQuery = {&lt;BR /&gt;where: "1=1", // retrieve all features&lt;BR /&gt;returnGeometry: true,&lt;BR /&gt;outFields: ["*"]&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;let fieldname = "URECD.URFloor2.NETWORK_ID";&lt;BR /&gt;const allFeatures = await buildinglayer.queryFeatures(allFeaturesQuery);&lt;BR /&gt;//const resultFeatureIds = results.features.map(feature =&amp;gt; feature.attributes.fieldname);&lt;BR /&gt;//const otherFeatures = allFeatures.features.filter(feature =&amp;gt; !resultFeatureIds.includes(feature.attributes.fieldname));&lt;/P&gt;&lt;P&gt;const resultFeatureIds = results.features.map(feature =&amp;gt; feature.attributes?.['URECD.URFloor2.NETWORK_ID']);&lt;BR /&gt;const otherFeatures = allFeatures.features.filter(feature =&amp;gt; !resultFeatureIds.includes(feature.attributes?.['URECD.URFloor2.NETWORK_ID']));&lt;/P&gt;&lt;P&gt;if (otherFeatures.length &amp;gt; 0) {&lt;BR /&gt;let symbol;&lt;BR /&gt;switch (otherFeatures[0].geometry.type) {&lt;BR /&gt;case "point":&lt;BR /&gt;symbol = {&lt;BR /&gt;type: "simple-marker",&lt;BR /&gt;size: 10,&lt;BR /&gt;opacity: 0.2 // adjust the opacity&lt;BR /&gt;};&lt;BR /&gt;break;&lt;BR /&gt;case "polygon":&lt;BR /&gt;symbol = {&lt;BR /&gt;//type: "simple-fill",&lt;BR /&gt;//excludedEffect: "opacity(50%)",&lt;BR /&gt;///*opacity: 0.90 */// adjust the opacity&lt;BR /&gt;//outline: {&lt;BR /&gt;// color: [128, 128, 128, 0.5],&lt;BR /&gt;// width: "0px"&lt;BR /&gt;//}&lt;BR /&gt;};&lt;BR /&gt;}&lt;BR /&gt;var otherGraphics = otherFeatures.map((feature) =&amp;gt; {&lt;BR /&gt;let graphic = new Graphic();&lt;BR /&gt;graphic.geometry = feature.geometry;&lt;BR /&gt;graphic.symbol = symbol;&lt;BR /&gt;return graphic;&lt;BR /&gt;});&lt;BR /&gt;view.graphics.addMany(otherGraphics);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;export async function unselectMapFeatures(FloorNumber) {&lt;BR /&gt;view.graphics.removeAll();&lt;BR /&gt;// filterMapfeatures(FloorNumber, divisionIds, groupIds, FilteredorgList);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;function getHRconfigLayers(FloorNumber) {&lt;BR /&gt;return FloorNumber === "2" ? HRconfigLayersFloor2 : HRconfigLayersFloor1;&lt;BR /&gt;}&lt;BR /&gt;function generateColor(value) {&lt;BR /&gt;// Assuming the color field contains hex color values (e.g., #FF0000)&lt;BR /&gt;return value;&lt;BR /&gt;}&lt;BR /&gt;function customLegend(orgList) {&lt;BR /&gt;view.when(() =&amp;gt; {&lt;BR /&gt;buildinglayer.when(() =&amp;gt; {&lt;BR /&gt;// console.log(buildinglayer);&lt;BR /&gt;var divCustomLegend = document.getElementById("divCustomLegend");&lt;BR /&gt;// Check if legend already exists&lt;BR /&gt;if (divCustomLegend) {&lt;BR /&gt;// Remove existing legend&lt;BR /&gt;divCustomLegend.remove();&lt;BR /&gt;}&lt;BR /&gt;// Create new legend&lt;BR /&gt;divCustomLegend = document.createElement("div");&lt;BR /&gt;divCustomLegend.id = "divCustomLegend";&lt;BR /&gt;divCustomLegend.style.height = "856px"; // Set a fixed height&lt;BR /&gt;divCustomLegend.style.overflowY = "auto";&lt;BR /&gt;const label = document.createElement("label");&lt;BR /&gt;label.textContent = "Legend";&lt;BR /&gt;label.style.fontFamily = "Roboto";&lt;BR /&gt;label.style.fontWeight = "bold";&lt;BR /&gt;label.style.color = "#384A66";&lt;BR /&gt;label.style.fontSize = "14px";&lt;BR /&gt;label.style.fontWeight = "500";&lt;BR /&gt;label.style.marginLeft = "500";&lt;BR /&gt;label.style.margin = "16px 24px"&lt;BR /&gt;divCustomLegend.appendChild(label);&lt;BR /&gt;const ul = document.createElement("ul");&lt;BR /&gt;ul.style.listStyleType = 'none';&lt;BR /&gt;ul.className = 'officeSpace';&lt;BR /&gt;// Check if orgList is not empty&lt;BR /&gt;if (orgList &amp;amp;&amp;amp; orgList.length &amp;gt; 0) {&lt;BR /&gt;if (orgList.length === 1) {&lt;BR /&gt;addDepartmentToLegend(orgList[0], ul);&lt;BR /&gt;} else {&lt;BR /&gt;orgList.forEach(department =&amp;gt; {&lt;BR /&gt;if (department.Ischecked) {&lt;BR /&gt;addDepartmentToLegend(department, ul);&lt;BR /&gt;}&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;// Handle case where orgList is empty&lt;BR /&gt;const li = document.createElement("li");&lt;BR /&gt;const label2 = document.createElement("label");&lt;BR /&gt;label2.textContent = "No Legends available";&lt;BR /&gt;label2.style.margin = "10px";&lt;BR /&gt;li.appendChild(label2);&lt;BR /&gt;ul.appendChild(li);&lt;BR /&gt;}&lt;BR /&gt;divCustomLegend.appendChild(ul);&lt;BR /&gt;setTimeout(() =&amp;gt; {&lt;BR /&gt;if (legend) {&lt;BR /&gt;view.ui.remove(legend);&lt;BR /&gt;}&lt;BR /&gt;legend = new Expand({&lt;BR /&gt;view: view,&lt;BR /&gt;content: divCustomLegend,&lt;BR /&gt;expandTooltip: "Legend",&lt;BR /&gt;expandIcon: "information",&lt;BR /&gt;collapseIcon: "information-f",&lt;BR /&gt;group: "bottom-left"&lt;BR /&gt;});&lt;BR /&gt;view.ui.add(legend, "top-right");&lt;BR /&gt;});&lt;BR /&gt;});&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;function addDepartmentToLegend(department, ul) {&lt;BR /&gt;if (department.Ischecked) {&lt;BR /&gt;const li = document.createElement("li");&lt;BR /&gt;li.style.display = "flex";&lt;BR /&gt;li.style.alignItems = "center";&lt;/P&gt;&lt;P&gt;const outline = document.createElement("div");&lt;BR /&gt;outline.style.width = "10px";&lt;BR /&gt;outline.style.height = "10px";&lt;BR /&gt;outline.style.border = "3px solid " + department.ColorCode;&lt;BR /&gt;outline.style.marginLeft = "-3px";&lt;BR /&gt;li.appendChild(outline);&lt;/P&gt;&lt;P&gt;const label = document.createElement("label");&lt;BR /&gt;label.textContent = department.Name;&lt;BR /&gt;label.style.marginLeft = "7px";&lt;BR /&gt;li.appendChild(label);&lt;BR /&gt;ul.appendChild(li);&lt;/P&gt;&lt;P&gt;// Add groups&lt;BR /&gt;if (department.Groups) {&lt;BR /&gt;department.Groups.forEach(group =&amp;gt; {&lt;BR /&gt;if (group.Ischecked) {&lt;BR /&gt;addGroupToLegend(group, ul);&lt;BR /&gt;}&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;// Add divisions&lt;BR /&gt;if (department.Divisions) {&lt;BR /&gt;department.Divisions.forEach(division =&amp;gt; {&lt;BR /&gt;if (division.Ischecked) {&lt;BR /&gt;addDivisionToLegend(division, ul);&lt;BR /&gt;}&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;function addDivisionToLegend(division, ul) {&lt;BR /&gt;const li = document.createElement("li");&lt;BR /&gt;const canvas = document.createElement("canvas");&lt;BR /&gt;canvas.width = 10;&lt;BR /&gt;canvas.height = 10;&lt;BR /&gt;canvas.style.backgroundColor = division.ColorCode;&lt;BR /&gt;li.appendChild(canvas);&lt;/P&gt;&lt;P&gt;const label = document.createElement("label");&lt;BR /&gt;label.textContent = division.Name;&lt;BR /&gt;label.style.margin = "10px";&lt;BR /&gt;li.appendChild(label);&lt;BR /&gt;ul.appendChild(li);&lt;/P&gt;&lt;P&gt;if (division.GroupDetail) {&lt;BR /&gt;division.GroupDetail.forEach(group =&amp;gt; {&lt;BR /&gt;if (group.Ischecked) {&lt;BR /&gt;addGroupToLegend(group, ul);&lt;BR /&gt;}&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;function addGroupToLegend(group, ul) {&lt;BR /&gt;const li = document.createElement("li");&lt;BR /&gt;const canvas = document.createElement("canvas");&lt;BR /&gt;canvas.width = 10;&lt;BR /&gt;canvas.height = 10;&lt;BR /&gt;canvas.style.backgroundColor = group.ColorCode;&lt;BR /&gt;canvas.style.borderRadius = "50%";&lt;BR /&gt;li.appendChild(canvas);&lt;/P&gt;&lt;P&gt;const label = document.createElement("label");&lt;BR /&gt;label.textContent = group.Name;&lt;BR /&gt;label.style.margin = "10px";&lt;BR /&gt;li.appendChild(label);&lt;BR /&gt;ul.appendChild(li);&lt;BR /&gt;}&lt;BR /&gt;//render unique value colors&lt;BR /&gt;async function rendervalue(orgList) {&lt;BR /&gt;try {&lt;BR /&gt;const query = {&lt;BR /&gt;where: "1=1",&lt;BR /&gt;outFields: ["*"],&lt;BR /&gt;returnGeometry: true&lt;BR /&gt;};&lt;BR /&gt;results = await buildinglayer.queryFeatures(query);&lt;BR /&gt;const uniqueValues = results.features.map((feature) =&amp;gt; feature.attributes?.['URECD.URFloor2.COLOR_CODE']);&lt;BR /&gt;const uniqueValueSet = new Set(uniqueValues);&lt;BR /&gt;// console.log(uniqueValues);&lt;/P&gt;&lt;P&gt;renderer = {&lt;BR /&gt;type: "unique-value",&lt;BR /&gt;field: "URECD.URFloor2.COLOR_CODE",&lt;BR /&gt;defaultSymbol: {&lt;BR /&gt;type: "simple-fill",&lt;BR /&gt;color: "#CFD8E6",&lt;BR /&gt;outline: {&lt;BR /&gt;width: 0&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;defaultLabel: "Unknown",&lt;BR /&gt;uniqueValueInfos: []&lt;BR /&gt;};&lt;BR /&gt;uniqueValueSet.forEach((value) =&amp;gt; {&lt;BR /&gt;const symbol = {&lt;BR /&gt;type: "simple-fill",&lt;BR /&gt;color: generateColor(value),&lt;BR /&gt;outline: {&lt;BR /&gt;width: 0&lt;BR /&gt;}&lt;BR /&gt;};&lt;BR /&gt;orgListjson = JSON.parse(orgList);&lt;BR /&gt;//const correspondingLabel = results.features.find((feature) =&amp;gt; feature.attributes?.['URECD.URFloor2.COLOR_CODE'] === value).attributes?.['URECD.URFloor2.ORGN_NAME'];&lt;BR /&gt;const correspondingLabel = results.features.find((feature) =&amp;gt; feature.attributes?.['URECD.URFloor2.COLOR_CODE'] === value).attributes?.['URECD.URFloor2.ORGN_NAME'];&lt;BR /&gt;const parentOrg = results.features.find((feature) =&amp;gt; feature.attributes?.['URECD.URFloor2.COLOR_CODE'] === value).attributes?.['URECD.URFloor2.PARENT_ORG'];&lt;BR /&gt;renderer.uniqueValueInfos.push({&lt;BR /&gt;value: value,&lt;BR /&gt;symbol: symbol,&lt;BR /&gt;label: `${correspondingLabel}`,&lt;BR /&gt;parentOrg: parentOrg&lt;BR /&gt;});&lt;BR /&gt;});&lt;BR /&gt;renderer.orderByClassesEnabled = true;&lt;BR /&gt;buildinglayer.renderer = renderer;&lt;BR /&gt;customLegend(orgListjson);&lt;BR /&gt;} catch (error) {&lt;BR /&gt;console.error('Error querying features:', error);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;function sendDataToDotNet(data) {&lt;/P&gt;&lt;P&gt;let city, Floornumber = '';&lt;BR /&gt;try { city = data['URECD.URFloor2.EMPLOYEE_A'].split('\r\n')[3]; } catch (e) { }&lt;/P&gt;&lt;P&gt;if (data['URECD.URFloor2.FLOOR_NUMB'] == null) { Floornumber = data['URECD.URFloor2.FLOOR_NUMB'] }&lt;BR /&gt;else { Floornumber = "" + data['URECD.URFloor2.FLOOR_NUMB'] }&lt;/P&gt;&lt;P&gt;let employeeDetail = {&lt;BR /&gt;Picture: data['URECD.Floor2BuilPlan_1.PICTURE'],&lt;BR /&gt;NetworkID: data['URECD.Floor2BuilPlan_1.NETWORKID'],&lt;BR /&gt;Name: data['URECD.URFloor2.FULL_NAME'],&lt;BR /&gt;Designation: toTitleCase(data['URECD.URFloor2.JOB_TITLE']),&lt;BR /&gt;Department: data['URECD.URFloor2.DEPARTMENT_NAME'],&lt;BR /&gt;DepartmentShortName: data['URECD.URFloor2.DEPARTMENT_SHORT_NAME'],&lt;BR /&gt;Unit: data['URECD.URFloor2.ORGN_NAME'],&lt;BR /&gt;unitShortName: data['URECD.URFloor2.ORGN_SHRT_NAME'],&lt;BR /&gt;City: city,&lt;BR /&gt;Building: data['URECD.URFloor2.BUIDLING'],&lt;BR /&gt;Floor: Floornumber,&lt;BR /&gt;Office: data['URECD.Floor2BuilPlan_1.LOCATION'],&lt;BR /&gt;}&lt;BR /&gt;let json = JSON.stringify(employeeDetail);&lt;/P&gt;&lt;P&gt;DotNet.invokeMethodAsync('URInsight2.Web.Client', 'SendArrayListToCSharp', json)&lt;BR /&gt;.then(data =&amp;gt; {&lt;BR /&gt;console.log(data);&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;function toTitleCase(value) {&lt;BR /&gt;let values = value.split(' ');&lt;BR /&gt;let returnValue = "";&lt;BR /&gt;values.forEach(function (data, index) {&lt;BR /&gt;returnValue += capitalizeFirstLetter(data.toLowerCase()) + ' ';&lt;BR /&gt;});&lt;BR /&gt;return returnValue;&lt;BR /&gt;}&lt;BR /&gt;function capitalizeFirstLetter(str) {&lt;BR /&gt;return str.charAt(0).toUpperCase() + str.slice(1);&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Wed, 11 Feb 2026 07:41:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-for-power-bi-questions/wep-map-is-not-loading/m-p/1655755#M2296</guid>
      <dc:creator>banu</dc:creator>
      <dc:date>2026-02-11T07:41:43Z</dc:date>
    </item>
  </channel>
</rss>

