<?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: Need to create a custom widget with multiple widgets enclosed within. in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-to-create-a-custom-widget-with-multiple/m-p/1345868#M82685</link>
    <description>&lt;P&gt;Thank you, will check this out&lt;/P&gt;</description>
    <pubDate>Sat, 04 Nov 2023 06:20:08 GMT</pubDate>
    <dc:creator>tippu_ks</dc:creator>
    <dc:date>2023-11-04T06:20:08Z</dc:date>
    <item>
      <title>Need to create a custom widget with multiple widgets enclosed within.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-to-create-a-custom-widget-with-multiple/m-p/1345795#M82681</link>
      <description>&lt;P&gt;&amp;lt;html&amp;gt;&lt;BR /&gt;&amp;lt;head&amp;gt;&lt;BR /&gt;&amp;lt;meta charset="utf-8"&amp;gt;&lt;BR /&gt;&amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"&amp;gt;&lt;BR /&gt;&amp;lt;title&amp;gt;ArcGIS Maps SDK for JavaScript Tutorials: Display a scene&amp;lt;/title&amp;gt;&lt;BR /&gt;&amp;lt;style&amp;gt;&lt;BR /&gt;html, body, #viewDiv {&lt;BR /&gt;padding: 0;&lt;BR /&gt;margin: 0;&lt;BR /&gt;height: 100%;&lt;BR /&gt;width: 100%;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&amp;lt;/style&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;link rel="stylesheet" href="&lt;A href="https://js.arcgis.com/4.28/esri/themes/light/main.css" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.28/esri/themes/light/main.css&lt;/A&gt;"&amp;gt;&lt;BR /&gt;&amp;lt;script src="&lt;A href="https://js.arcgis.com/4.28/" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.28/&lt;/A&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;script&amp;gt;&lt;BR /&gt;require([&lt;BR /&gt;"esri/config",&lt;BR /&gt;"esri/Map",&lt;BR /&gt;"esri/views/SceneView",&lt;BR /&gt;"esri/layers/FeatureLayer",&lt;BR /&gt;"esri/widgets/Expand",&lt;BR /&gt;"esri/widgets/BasemapGallery",&lt;BR /&gt;"esri/widgets/AreaMeasurement3D",&lt;BR /&gt;"esri/widgets/LineOfSight",&lt;BR /&gt;"esri/widgets/LayerList",&lt;BR /&gt;"esri/widgets/Legend",&lt;BR /&gt;"esri/widgets/Compass"&lt;BR /&gt;], function(esriConfig, Map, SceneView, FeatureLayer, Expand, BasemapGallery, AreaMeasurement3D, LineOfSight, LayerList, Legend, Compass) {&lt;/P&gt;&lt;P&gt;esriConfig.apiKey = "AAPKb6723de7d64b410ca4b3106297567589haGVc4dtuVBzVw1isFbYLznf9QbiJJ27VVkAZruKb0Y3N91W2kBNUn268t7DvYPC";&lt;/P&gt;&lt;P&gt;const map = new Map({&lt;BR /&gt;basemap: "arcgis/topographic", // basemap styles service&lt;BR /&gt;ground: "world-elevation", //Elevation service&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;const view = new SceneView({&lt;BR /&gt;container: "viewDiv",&lt;BR /&gt;map: map,&lt;BR /&gt;camera: {&lt;BR /&gt;position: {&lt;BR /&gt;x: -118.808, //Longitude&lt;BR /&gt;y: 33.961, //Latitude&lt;BR /&gt;z: 2000 //Meters&lt;BR /&gt;},&lt;BR /&gt;tilt: 75&lt;BR /&gt;}&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;// Define a pop-up for Trailheads&lt;BR /&gt;const popupTrailheads = {&lt;BR /&gt;"title": "Trailhead",&lt;BR /&gt;"content": "&amp;lt;b&amp;gt;Trail:&amp;lt;/b&amp;gt; {TRL_NAME}&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;City:&amp;lt;/b&amp;gt; {CITY_JUR}&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Cross Street:&amp;lt;/b&amp;gt; {X_STREET}&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Parking:&amp;lt;/b&amp;gt; {PARKING}&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Elevation:&amp;lt;/b&amp;gt; {ELEV_FT} ft"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;const trailheads = new FeatureLayer({&lt;BR /&gt;url: "&lt;A href="https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Trailheads_Styled/FeatureServer/0" target="_blank" rel="noopener"&gt;https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Trailheads_Styled/FeatureServer/0&lt;/A&gt;",&lt;BR /&gt;outFields: ["TRL_NAME","CITY_JUR","X_STREET","PARKING","ELEV_FT"],&lt;BR /&gt;popupTemplate: popupTrailheads&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;map.add(trailheads);&lt;/P&gt;&lt;P&gt;// Define a popup for Trails&lt;BR /&gt;const popupTrails = {&lt;BR /&gt;title: "Trail Information",&lt;BR /&gt;content: [{&lt;BR /&gt;type: "media",&lt;BR /&gt;mediaInfos: [{&lt;BR /&gt;type: "column-chart",&lt;BR /&gt;caption: "",&lt;BR /&gt;value: {&lt;BR /&gt;fields: [ "ELEV_MIN","ELEV_MAX" ],&lt;BR /&gt;normalizeField: null,&lt;BR /&gt;tooltipField: "Min and max elevation values"&lt;BR /&gt;}&lt;BR /&gt;}]&lt;BR /&gt;}]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;const trails = new FeatureLayer({&lt;BR /&gt;url: "&lt;A href="https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Trails_Styled/FeatureServer/0" target="_blank" rel="noopener"&gt;https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Trails_Styled/FeatureServer/0&lt;/A&gt;",&lt;BR /&gt;outFields: ["TRL_NAME","ELEV_GAIN"],&lt;BR /&gt;popupTemplate: popupTrails&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;map.add(trails,0);&lt;/P&gt;&lt;P&gt;// Create a BasemapGallery widget instance and set&lt;BR /&gt;// its container to a div element&lt;/P&gt;&lt;P&gt;const basemapGallery = new BasemapGallery({&lt;BR /&gt;view: view,&lt;BR /&gt;container: document.createElement("div")&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;// Create an Expand instance and set the content&lt;BR /&gt;// property to the DOM node of the basemap gallery widget&lt;/P&gt;&lt;P&gt;const bgExpand = new Expand({&lt;BR /&gt;view: view,&lt;BR /&gt;content: basemapGallery&lt;BR /&gt;});&lt;BR /&gt;&lt;BR /&gt;//Area Measurement&lt;BR /&gt;const measurementWidget = new AreaMeasurement3D({&lt;BR /&gt;view: view&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;const areaExpand = new Expand({&lt;BR /&gt;view: view,&lt;BR /&gt;content: measurementWidget&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;const lineOfSight = new LineOfSight({&lt;BR /&gt;view: view&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;const lineOfSightExpand = new Expand({&lt;BR /&gt;view: view,&lt;BR /&gt;content: lineOfSight&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;// LayerList&lt;BR /&gt;const layerList = new LayerList({&lt;BR /&gt;view: view&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;// Use an Esri icon font to represent the content inside&lt;BR /&gt;// of the Expand widget&lt;BR /&gt;const layerListExpand = new Expand({&lt;BR /&gt;expandIconClass: "esri-icon-layer-list",&lt;BR /&gt;view: view,&lt;BR /&gt;content: layerList&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;const legend = new Legend({&lt;BR /&gt;view: view&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;const legendExpand = new Expand({&lt;BR /&gt;expandIconClass: "esri-icon-legend",&lt;BR /&gt;view: view,&lt;BR /&gt;content: legend&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;const compass = new Compass({&lt;BR /&gt;view: view&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;const compassExpand = new Expand({&lt;BR /&gt;view: view,&lt;BR /&gt;content: compass&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;view.ui.add([bgExpand, areaExpand, lineOfSightExpand, layerListExpand, legendExpand, compassExpand], "top-right");&lt;/P&gt;&lt;P&gt;});&lt;BR /&gt;&amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/head&amp;gt;&lt;BR /&gt;&amp;lt;body&amp;gt;&lt;BR /&gt;&amp;lt;div id="viewDiv"&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;BR /&gt;&lt;BR /&gt;My Result:&lt;BR /&gt;* Widgets on the right&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-11-04 015327.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/85026i95E210AB086FA26C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-11-04 015327.png" alt="Screenshot 2023-11-04 015327.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need my widget to include multiple widgets within, how to achieve that?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Picture1.png" style="width: 904px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/85028i1A5274979E4EE569/image-size/large?v=v2&amp;amp;px=999" role="button" title="Picture1.png" alt="Picture1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is my goal widget. Mine should be expandable like this with multiple widgets within.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Picture2.png" style="width: 227px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/85027i454D4289B2F8917B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Picture2.png" alt="Picture2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 20:30:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-to-create-a-custom-widget-with-multiple/m-p/1345795#M82681</guid>
      <dc:creator>tippu_ks</dc:creator>
      <dc:date>2023-11-03T20:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create a custom widget with multiple widgets enclosed within.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-to-create-a-custom-widget-with-multiple/m-p/1345800#M82682</link>
      <description>&lt;P&gt;You should remove your api key from your snippet.&lt;/P&gt;&lt;P&gt;You can probably accomplish what you want to do with Calcite components.&lt;/P&gt;&lt;P&gt;Here is a tutorial similar to what you want.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/calcite-design-system/tutorials/create-a-mapping-app/" target="_blank"&gt;https://developers.arcgis.com/calcite-design-system/tutorials/create-a-mapping-app/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The action-bar also support a horizontal layout.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/calcite-design-system/components/action-bar/" target="_blank"&gt;https://developers.arcgis.com/calcite-design-system/components/action-bar/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The calcite tutorials and documentation should help you accomplish what you're trying to do.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 20:38:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-to-create-a-custom-widget-with-multiple/m-p/1345800#M82682</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2023-11-03T20:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create a custom widget with multiple widgets enclosed within.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-to-create-a-custom-widget-with-multiple/m-p/1345868#M82685</link>
      <description>&lt;P&gt;Thank you, will check this out&lt;/P&gt;</description>
      <pubDate>Sat, 04 Nov 2023 06:20:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-to-create-a-custom-widget-with-multiple/m-p/1345868#M82685</guid>
      <dc:creator>tippu_ks</dc:creator>
      <dc:date>2023-11-04T06:20:08Z</dc:date>
    </item>
  </channel>
</rss>

