<?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 Real World Sizing of CIMSymbol in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/real-world-sizing-of-cimsymbol/m-p/1177755#M77498</link>
    <description>&lt;P&gt;I've been unable to display a CIMSymbol with real-world dimensions in a scene view. Can anybody offer any assistance? Here is a sample of code to test with. I am using useRealWorldSymbolSizes, but it doesn't seem to be working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I zoom in on the map, I'd expect the icon to appear larger as it's overall dimensions remain the same, but it's scaling "normally", which isn't the desired behaviour here.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset="utf-8" /&amp;gt;
    &amp;lt;meta
      name="viewport"
      content="initial-scale=1,maximum-scale=1,user-scalable=no"
    /&amp;gt;
    &amp;lt;title&amp;gt;
      Testing 3D Vessel
    &amp;lt;/title&amp;gt;

    &amp;lt;link
      rel="stylesheet"
      href="https://js.arcgis.com/4.23/esri/themes/light/main.css"
    /&amp;gt;
    &amp;lt;script src="https://js.arcgis.com/4.23/"&amp;gt;&amp;lt;/script&amp;gt;

    &amp;lt;style&amp;gt;
      html,
      body,
      #viewDiv {
        padding: 0;
        margin: 0;
        height: 100%;
        width: 100%;
      }
    &amp;lt;/style&amp;gt;

    &amp;lt;script&amp;gt;
      require([
        "esri/Map",
        "esri/Basemap",
        "esri/Graphic",
        "esri/geometry/Mesh",
        "esri/geometry/Point",
        "esri/views/SceneView",
        "esri/layers/FeatureLayer",
        "esri/widgets/Legend",
        "esri/renderers/Renderer",
		"esri/symbols/CIMSymbol",
		"esri/symbols/support/cimSymbolUtils"
      ], (
        Map,
        Basemap,
        Graphic,
        Mesh,
        Point,
        SceneView,
        FeatureLayer,
        Legend,
        Renderer,
		CIMSymbol,
		cimSymbolUtils
      ) =&amp;gt; {
        let startingPoint = new Point({
          type: "point", // autocasts as new Point()
          x: -90,
          y: 30
        });

		const vesselBeam = 100;
		const vesselLength = 250;
		const vesselSymbol = new CIMSymbol({
		  data: {
			type: "CIMSymbolReference",
			symbol: {
			  type: "CIMPointSymbol",
			  useRealWorldSymbolSizes: true,
			  symbolLayers: [
				{
				  type: "CIMVectorMarker",
				  enable: true,
				  size: vesselLength,
				  anchorPointUnits: "Relative",
				  billboardMode3D: "None",
				  frame: {
					xmin: 0,
					ymin: 0,
					xmax: vesselBeam,
					ymax: vesselLength
				  },
				  markerGraphics: [
					{
					  type: "CIMMarkerGraphic",
					  geometry: {
						rings: [[[0,0],[0,vesselLength*0.8],[vesselBeam/2,vesselLength],[vesselBeam,vesselLength*0.8],[vesselBeam,0],[0,0]]]
					  },
					  symbol: {
						type: "CIMPolygonSymbol",
						symbolLayers: [
						  {
							type: "CIMSolidStroke",
							enable: true,
							width: 8,
							color: [0,0,0,255]
						  },
						  {
							type: "CIMSolidFill",
							enable: true,
							color: [51,51,51,255]
						  }
						]
					  }
					}
				  ],
				  scaleSymbolsProportionally: true
				}
			  ]
			}
		  }
		});

        
        const map = new Map({
          basemap: "hybrid"
        });

        const view = new SceneView({
          container: "viewDiv",
          map: map,
          center: [-90, 30],
          zoom: 17
        });

        let features = [
		 {
		  geometry: startingPoint,
		   attributes: {
			 ObjectID: 1
		   }
		 }
		];

		// geometryType and spatialReference of the layer
		// will be inferred from the first feature in the array
		// if it has a geometry.
		let layer = new FeatureLayer({
		  source: features,  // autocast as a Collection of new Graphic()
		  objectIdField: "ObjectID",
		  renderer: {
			type: "simple",
			symbol: vesselSymbol
		}
		});
		
		map.add(layer);
        
         view.on("click", function(event) {
          // Get the coordinates of the click on the view
          var lat = event.mapPoint.latitude;
          var lon = event.mapPoint.longitude;
          newPoint = new Point({
            type: "point", // autocasts as new Point()
            x: lon,
            y: lat
          });
		  
		  let editFeatures = [
			 {
			  geometry: newPoint,
			   attributes: {
				 ObjectID: 1
			   }
			 }
			];
		  
		  let edits = {
			updateFeatures: editFeatures
		  };
		  layer.applyEdits(edits).then(function(results) {
		  });
          view.goTo(newPoint);


        });
		
      }); 
    &amp;lt;/script&amp;gt;
  &amp;lt;/head&amp;gt;

  &amp;lt;body&amp;gt;
    &amp;lt;div id="viewDiv"&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 26 May 2022 21:43:02 GMT</pubDate>
    <dc:creator>JesseKHall</dc:creator>
    <dc:date>2022-05-26T21:43:02Z</dc:date>
    <item>
      <title>Real World Sizing of CIMSymbol</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/real-world-sizing-of-cimsymbol/m-p/1177755#M77498</link>
      <description>&lt;P&gt;I've been unable to display a CIMSymbol with real-world dimensions in a scene view. Can anybody offer any assistance? Here is a sample of code to test with. I am using useRealWorldSymbolSizes, but it doesn't seem to be working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I zoom in on the map, I'd expect the icon to appear larger as it's overall dimensions remain the same, but it's scaling "normally", which isn't the desired behaviour here.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset="utf-8" /&amp;gt;
    &amp;lt;meta
      name="viewport"
      content="initial-scale=1,maximum-scale=1,user-scalable=no"
    /&amp;gt;
    &amp;lt;title&amp;gt;
      Testing 3D Vessel
    &amp;lt;/title&amp;gt;

    &amp;lt;link
      rel="stylesheet"
      href="https://js.arcgis.com/4.23/esri/themes/light/main.css"
    /&amp;gt;
    &amp;lt;script src="https://js.arcgis.com/4.23/"&amp;gt;&amp;lt;/script&amp;gt;

    &amp;lt;style&amp;gt;
      html,
      body,
      #viewDiv {
        padding: 0;
        margin: 0;
        height: 100%;
        width: 100%;
      }
    &amp;lt;/style&amp;gt;

    &amp;lt;script&amp;gt;
      require([
        "esri/Map",
        "esri/Basemap",
        "esri/Graphic",
        "esri/geometry/Mesh",
        "esri/geometry/Point",
        "esri/views/SceneView",
        "esri/layers/FeatureLayer",
        "esri/widgets/Legend",
        "esri/renderers/Renderer",
		"esri/symbols/CIMSymbol",
		"esri/symbols/support/cimSymbolUtils"
      ], (
        Map,
        Basemap,
        Graphic,
        Mesh,
        Point,
        SceneView,
        FeatureLayer,
        Legend,
        Renderer,
		CIMSymbol,
		cimSymbolUtils
      ) =&amp;gt; {
        let startingPoint = new Point({
          type: "point", // autocasts as new Point()
          x: -90,
          y: 30
        });

		const vesselBeam = 100;
		const vesselLength = 250;
		const vesselSymbol = new CIMSymbol({
		  data: {
			type: "CIMSymbolReference",
			symbol: {
			  type: "CIMPointSymbol",
			  useRealWorldSymbolSizes: true,
			  symbolLayers: [
				{
				  type: "CIMVectorMarker",
				  enable: true,
				  size: vesselLength,
				  anchorPointUnits: "Relative",
				  billboardMode3D: "None",
				  frame: {
					xmin: 0,
					ymin: 0,
					xmax: vesselBeam,
					ymax: vesselLength
				  },
				  markerGraphics: [
					{
					  type: "CIMMarkerGraphic",
					  geometry: {
						rings: [[[0,0],[0,vesselLength*0.8],[vesselBeam/2,vesselLength],[vesselBeam,vesselLength*0.8],[vesselBeam,0],[0,0]]]
					  },
					  symbol: {
						type: "CIMPolygonSymbol",
						symbolLayers: [
						  {
							type: "CIMSolidStroke",
							enable: true,
							width: 8,
							color: [0,0,0,255]
						  },
						  {
							type: "CIMSolidFill",
							enable: true,
							color: [51,51,51,255]
						  }
						]
					  }
					}
				  ],
				  scaleSymbolsProportionally: true
				}
			  ]
			}
		  }
		});

        
        const map = new Map({
          basemap: "hybrid"
        });

        const view = new SceneView({
          container: "viewDiv",
          map: map,
          center: [-90, 30],
          zoom: 17
        });

        let features = [
		 {
		  geometry: startingPoint,
		   attributes: {
			 ObjectID: 1
		   }
		 }
		];

		// geometryType and spatialReference of the layer
		// will be inferred from the first feature in the array
		// if it has a geometry.
		let layer = new FeatureLayer({
		  source: features,  // autocast as a Collection of new Graphic()
		  objectIdField: "ObjectID",
		  renderer: {
			type: "simple",
			symbol: vesselSymbol
		}
		});
		
		map.add(layer);
        
         view.on("click", function(event) {
          // Get the coordinates of the click on the view
          var lat = event.mapPoint.latitude;
          var lon = event.mapPoint.longitude;
          newPoint = new Point({
            type: "point", // autocasts as new Point()
            x: lon,
            y: lat
          });
		  
		  let editFeatures = [
			 {
			  geometry: newPoint,
			   attributes: {
				 ObjectID: 1
			   }
			 }
			];
		  
		  let edits = {
			updateFeatures: editFeatures
		  };
		  layer.applyEdits(edits).then(function(results) {
		  });
          view.goTo(newPoint);


        });
		
      }); 
    &amp;lt;/script&amp;gt;
  &amp;lt;/head&amp;gt;

  &amp;lt;body&amp;gt;
    &amp;lt;div id="viewDiv"&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 21:43:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/real-world-sizing-of-cimsymbol/m-p/1177755#M77498</guid>
      <dc:creator>JesseKHall</dc:creator>
      <dc:date>2022-05-26T21:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: Real World Sizing of CIMSymbol</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/real-world-sizing-of-cimsymbol/m-p/1178465#M77525</link>
      <description>&lt;P&gt;Our 2D symbology showing flat icons, lines or CIM as you are using do not support real world sizes unfortunately. We would recommend using volumetric 3D symbology such as &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html" target="_self"&gt;ObjectSymbol3DLayer&lt;/A&gt; or &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-WebStyleSymbol.html" target="_self"&gt;WebStyleSymbols&lt;/A&gt; that also provide out of the box &lt;A href="https://developers.arcgis.com/javascript/latest/visualization/symbols-color-ramps/esri-web-style-symbols-3d/#transportation" target="_self"&gt;models for vessels&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Note that you can combine multiple layers of ObjectSymbol3DLayer primitives in a single point symbol to potentially create more complex, real world sized symbology.&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 08:37:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/real-world-sizing-of-cimsymbol/m-p/1178465#M77525</guid>
      <dc:creator>ArnoFiva</dc:creator>
      <dc:date>2022-05-31T08:37:19Z</dc:date>
    </item>
  </channel>
</rss>

