<?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: Click on a 3D layer building to get building metadata from OSM in ArcGIS Maps SDK for Unity Questions</title>
    <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/click-on-a-3d-layer-building-to-get-building/m-p/1288799#M538</link>
    <description>&lt;P&gt;which dataset are you using? Note that we don't currently support&amp;nbsp;&lt;A href="https://www.arcgis.com/home/item.html?id=ca0470dbbddb4db28bad74ed39949e25" target="_blank"&gt;https://www.arcgis.com/home/item.html?id=ca0470dbbddb4db28bad74ed39949e25&lt;/A&gt;&amp;nbsp;but this is a highly requested service so it's high on our priority list.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 May 2023 21:43:26 GMT</pubDate>
    <dc:creator>Jade</dc:creator>
    <dc:date>2023-05-12T21:43:26Z</dc:date>
    <item>
      <title>Click on a 3D layer building to get building metadata from OSM</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/click-on-a-3d-layer-building-to-get-building/m-p/1287157#M521</link>
      <description>&lt;P&gt;I am studying the ArcGis for Unity SDK for some time and have been tweaking the SampleArcGisRaycast component from the Unity SDK to various interesting things. Now I want to make a way to get Open Street Map Metadata by clicking on each building. For now, getting them to be written in Debug.Log would be enough.&lt;/P&gt;&lt;P&gt;I followed up on many documentation articles and ArcGis blogs about the subject, but I could not find a way to implement this. To be honest I don't even understand where I should start and the milestones of creating such a system. My starting point was this article&amp;gt; &lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-living-atlas/mapping/live-openstreetmap-data-in-arcgis/" target="_self"&gt;https://www.esri.com/arcgis-blog/products/arcgis-living-atlas/mapping/live-openstreetmap-data-in-arcgis/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;At the moment, I managed to console log a value called `featureId` from the SampleArcGisRaycast component, --some kind of a value that is uniquely assigned to each building. Is there a way to request OSM building information from this `featureId` value?&lt;/P&gt;&lt;P&gt;here's the updated code I used to get the feature ID:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;void Update(){
if (Input.GetKey(KeyCode.LeftShift) &amp;amp;&amp;amp; Input.GetMouseButtonDown(0))
		{
			RaycastHit hit;
			Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);

			if (Physics.Raycast(ray, out hit))
			{
				var arcGISRaycastHit = arcGISMapComponent.GetArcGISRaycastHit(hit);
				var layer = arcGISRaycastHit.layer;
				var featureId = arcGISRaycastHit.featureId;
				
				DumpToConsole(arcGISRaycastHit.layer);
				DumpToConsole(arcGISRaycastHit);
				if (layer != null &amp;amp;&amp;amp; featureId != -1)
				{
					popUp.SetActive(true);
					// featureText is an UI text 
					featureText.text = featureId.ToString();
					metadataText.text = JSONReader.getCity(featureId.ToString());
					
					var geoPosition = arcGISMapComponent.EngineToGeographic(hit.point);

					var offsetPosition = new ArcGISPoint(geoPosition.X, geoPosition.Y, geoPosition.Z + 200, geoPosition.SpatialReference);
					var rotation = arcGISCamera.GetComponent&amp;lt;ArcGISLocationComponent&amp;gt;().Rotation;
					var location = canvas.GetComponent&amp;lt;ArcGISLocationComponent&amp;gt;();
					location.Position = offsetPosition;
					location.Rotation = rotation;
					Debug.Log("Location == x: " + location.Position.X + "| y: " + location.Position.Y+"| z: " + location.Position.Z);
					Debug.Log("Location p == x: " + location.position.X + "| y: " + location.position.Y + "| z: " + location.position.Z);
					Debug.Log("GeoPosition == x: " + geoPosition.X + "| y: " + geoPosition.Y + "| z: " + geoPosition.Z);
					
				}
				else
				{
					popUp.SetActive(false);
				}
            }
            

		}
#endif
	}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My other guess to get this working is to somehow get the coordinates of the building and then find a way to get the OSM metadata according to the coordinates. Or &lt;STRONG&gt;should I follow a different path?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 08:19:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/click-on-a-3d-layer-building-to-get-building/m-p/1287157#M521</guid>
      <dc:creator>navintc</dc:creator>
      <dc:date>2023-05-09T08:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: Click on a 3D layer building to get building metadata from OSM</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/click-on-a-3d-layer-building-to-get-building/m-p/1288799#M538</link>
      <description>&lt;P&gt;which dataset are you using? Note that we don't currently support&amp;nbsp;&lt;A href="https://www.arcgis.com/home/item.html?id=ca0470dbbddb4db28bad74ed39949e25" target="_blank"&gt;https://www.arcgis.com/home/item.html?id=ca0470dbbddb4db28bad74ed39949e25&lt;/A&gt;&amp;nbsp;but this is a highly requested service so it's high on our priority list.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 21:43:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/click-on-a-3d-layer-building-to-get-building/m-p/1288799#M538</guid>
      <dc:creator>Jade</dc:creator>
      <dc:date>2023-05-12T21:43:26Z</dc:date>
    </item>
  </channel>
</rss>

