<?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 Making a map floor aware using JavaScript in ArcGIS Indoors Questions</title>
    <link>https://community.esri.com/t5/arcgis-indoors-questions/making-a-map-floor-aware-using-javascript/m-p/1378601#M716</link>
    <description>&lt;P&gt;Hi, I am creating a custom space planner application in which i am using a map which is not floor aware. I am making the map floor aware through code for which i am writing the following code:&lt;BR /&gt;webMap.current?.loadAll().then(() =&amp;gt; {&lt;BR /&gt;const levelLayer = webMap.current?.allLayers?.find(&lt;BR /&gt;(x) =&amp;gt; x.title === "Levels"&lt;BR /&gt;);&lt;BR /&gt;const facilityLayer = webMap.current?.allLayers?.find(&lt;BR /&gt;(x) =&amp;gt; x.title === "Facilities"&lt;BR /&gt;);&lt;BR /&gt;const floorInfoLayer = new LayerFloorInfo({&lt;BR /&gt;floorField: "LEVEL_ID",&lt;BR /&gt;});&lt;BR /&gt;console.log(webMap.current.allLayers);&lt;BR /&gt;webMap.current?.allLayers?.forEach((x) =&amp;gt; {&lt;BR /&gt;if(x.title === "Units" || x.title === "Details"||x.title=== "Units Base"){&lt;BR /&gt;x.floorInfo = floorInfoLayer;&lt;BR /&gt;}&lt;BR /&gt;});&lt;BR /&gt;&lt;BR /&gt;const floorInfoWebMap = {&lt;BR /&gt;levelLayer: {&lt;BR /&gt;facilityIdField: "FACILITY_ID",&lt;BR /&gt;layerId: levelLayer.id,&lt;BR /&gt;levelIdField: "LEVEL_ID",&lt;BR /&gt;levelNumberField: "LEVEL_NUMBER",&lt;BR /&gt;longNameField: "NAME",&lt;BR /&gt;shortNameField: "NAME_SHORT",&lt;BR /&gt;verticalOrderField: "VERTICAL_ORDER",&lt;BR /&gt;},&lt;BR /&gt;facilityLayer: {&lt;BR /&gt;facilityIdField: "FACILITY_ID",&lt;BR /&gt;layerId: facilityLayer.id,&lt;BR /&gt;nameField: "NAME",&lt;BR /&gt;siteIdField: "SITE_ID",&lt;BR /&gt;},&lt;BR /&gt;};&lt;BR /&gt;webMap.current.floorInfo = floorInfoWebMap;&lt;BR /&gt;});&lt;BR /&gt;When i am running the code it is making one map floor aware but for the other map i am not being able to make my map floor aware. Can someone please suggest me what am i doing wrong and how to resolve the issue? The difference in the two map is that second map which is failing to become flooraware has an additional 'Occupants' and a 'Units Base' layers&lt;/P&gt;</description>
    <pubDate>Tue, 06 Feb 2024 13:24:23 GMT</pubDate>
    <dc:creator>AbhyanshuGupta</dc:creator>
    <dc:date>2024-02-06T13:24:23Z</dc:date>
    <item>
      <title>Making a map floor aware using JavaScript</title>
      <link>https://community.esri.com/t5/arcgis-indoors-questions/making-a-map-floor-aware-using-javascript/m-p/1378601#M716</link>
      <description>&lt;P&gt;Hi, I am creating a custom space planner application in which i am using a map which is not floor aware. I am making the map floor aware through code for which i am writing the following code:&lt;BR /&gt;webMap.current?.loadAll().then(() =&amp;gt; {&lt;BR /&gt;const levelLayer = webMap.current?.allLayers?.find(&lt;BR /&gt;(x) =&amp;gt; x.title === "Levels"&lt;BR /&gt;);&lt;BR /&gt;const facilityLayer = webMap.current?.allLayers?.find(&lt;BR /&gt;(x) =&amp;gt; x.title === "Facilities"&lt;BR /&gt;);&lt;BR /&gt;const floorInfoLayer = new LayerFloorInfo({&lt;BR /&gt;floorField: "LEVEL_ID",&lt;BR /&gt;});&lt;BR /&gt;console.log(webMap.current.allLayers);&lt;BR /&gt;webMap.current?.allLayers?.forEach((x) =&amp;gt; {&lt;BR /&gt;if(x.title === "Units" || x.title === "Details"||x.title=== "Units Base"){&lt;BR /&gt;x.floorInfo = floorInfoLayer;&lt;BR /&gt;}&lt;BR /&gt;});&lt;BR /&gt;&lt;BR /&gt;const floorInfoWebMap = {&lt;BR /&gt;levelLayer: {&lt;BR /&gt;facilityIdField: "FACILITY_ID",&lt;BR /&gt;layerId: levelLayer.id,&lt;BR /&gt;levelIdField: "LEVEL_ID",&lt;BR /&gt;levelNumberField: "LEVEL_NUMBER",&lt;BR /&gt;longNameField: "NAME",&lt;BR /&gt;shortNameField: "NAME_SHORT",&lt;BR /&gt;verticalOrderField: "VERTICAL_ORDER",&lt;BR /&gt;},&lt;BR /&gt;facilityLayer: {&lt;BR /&gt;facilityIdField: "FACILITY_ID",&lt;BR /&gt;layerId: facilityLayer.id,&lt;BR /&gt;nameField: "NAME",&lt;BR /&gt;siteIdField: "SITE_ID",&lt;BR /&gt;},&lt;BR /&gt;};&lt;BR /&gt;webMap.current.floorInfo = floorInfoWebMap;&lt;BR /&gt;});&lt;BR /&gt;When i am running the code it is making one map floor aware but for the other map i am not being able to make my map floor aware. Can someone please suggest me what am i doing wrong and how to resolve the issue? The difference in the two map is that second map which is failing to become flooraware has an additional 'Occupants' and a 'Units Base' layers&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 13:24:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-indoors-questions/making-a-map-floor-aware-using-javascript/m-p/1378601#M716</guid>
      <dc:creator>AbhyanshuGupta</dc:creator>
      <dc:date>2024-02-06T13:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Making a map floor aware using JavaScript</title>
      <link>https://community.esri.com/t5/arcgis-indoors-questions/making-a-map-floor-aware-using-javascript/m-p/1379139#M717</link>
      <description>&lt;P&gt;Can someone please suggest.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 15:53:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-indoors-questions/making-a-map-floor-aware-using-javascript/m-p/1379139#M717</guid>
      <dc:creator>AbhyanshuGupta</dc:creator>
      <dc:date>2024-02-07T15:53:03Z</dc:date>
    </item>
  </channel>
</rss>

