<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Infinity Code Forum — Getting Marker Positions as a Vector3]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=2139</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=2139&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Getting Marker Positions as a Vector3.]]></description>
		<lastBuildDate>Tue, 11 Jul 2023 12:09:54 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Getting Marker Positions as a Vector3]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9108#p9108</link>
			<description><![CDATA[<p>Ah. Yes I called update and things worked as expected. I think I am a couple of versions out and I do not have the GetWorldPositionWithElevation(double lng, double lat, float altitude)..but I am always afraid to upgrade packages of things when things are mostly working ( hence going with the MARKER.update();</p><p>thanks for the help. Greatly appreciated!! I should have known that an update/refresh would do the trick!</p>]]></description>
			<author><![CDATA[null@example.com (d.arrenmacisaac)]]></author>
			<pubDate>Tue, 11 Jul 2023 12:09:54 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9108#p9108</guid>
		</item>
		<item>
			<title><![CDATA[Re: Getting Marker Positions as a Vector3]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9107#p9107</link>
			<description><![CDATA[<p>Hi.</p><p>Marker positions are not updated immediately, but when the map is redrawn.<br />You need to call marker.Update to force a marker to update the position or use OnlineMapsControlBaseDynamicMesh.GetWorldPositionWithElevation(double lng, double lat, float altitude) to get the position in the scene, without creating markers.<br /><a href="https://infinity-code.com/doxygen/online-maps/classOnlineMapsControlBaseDynamicMesh.html#a69268480a0594cae8de049341347139b">https://infinity-code.com/doxygen/onlin … 341347139b</a></p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Tue, 11 Jul 2023 11:27:01 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9107#p9107</guid>
		</item>
		<item>
			<title><![CDATA[Re: Getting Marker Positions as a Vector3]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9106#p9106</link>
			<description><![CDATA[<p>..also worth noting I did look at the &quot;getPosition&quot; possibilities but I was only seeing vector2 return values and nothing. I also created ( from :</p><p> public Vector3 GetWorldPositionOfMarkerWithElevation(double lng, double lat, double heightVal)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; double mx, my;<br />&nbsp; &nbsp; &nbsp; &nbsp; GetPosition(lng, lat, out mx, out my);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; mx = -mx / map.width * sizeInScene.x;<br />&nbsp; &nbsp; &nbsp; &nbsp; my = my / map.height * sizeInScene.y;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; float y = (float)heightVal;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; Vector3 offset = transform.rotation * new Vector3((float)mx, y, (float)my);<br />&nbsp; &nbsp; &nbsp; &nbsp; offset.Scale(map.transform.lossyScale);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; return map.transform.position + offset;<br />&nbsp; &nbsp; }</p><p>...and while this is not accurate it does render lines which are too deep ( I am sure my scaling needs work!!) . This work was based off of&nbsp; public Vector3 GetWorldPositionWithElevation(double lng, double lat, double tlx, double tly, double brx, double bry).</p>]]></description>
			<author><![CDATA[null@example.com (d.arrenmacisaac)]]></author>
			<pubDate>Mon, 10 Jul 2023 19:54:48 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9106#p9106</guid>
		</item>
		<item>
			<title><![CDATA[Getting Marker Positions as a Vector3]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9105#p9105</link>
			<description><![CDATA[<p>Hello,</p><p>I have been using OnlineMaps for some dev work and I am hoping someone can assist me with getting the location of a OnlineMapsMarker3D marker ( I have added many markers to the map with altitude). I create many markers on the map with altitude and I want to get the markers world position and not where it is living on the map. I want to connect these markers with a lineRenderer ( not draw on the map ) and I know how to do it fine outside of OnlineMaps..but the issue is that as soon as I add the marker to the map and start to query for its position I cannot get the actual position. I have looked at MARKER.instance.transform.position and MARKER.transform.position but things do not appear to pass back the actual transform of the OnlineMapsMarker3D. </p><p>Inside of a loop I am doing:</p><p> OnlineMapsMarker3D fishLoc = OnlineMapsMarker3DManager.CreateItem(nLng, nLat, bearingGameObject);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fishLoc.altitudeType = OnlineMapsAltitudeType.absolute;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fishLoc.altitude = showBelowWater ? val.z : -val.z;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fishLoc.sizeType = OnlineMapsMarker3D.SizeType.meters;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fishLoc.scale = 100f;</p><p>..then I am trying to get the world position of the marker I just added ( something like): </p><p>vector3 actualWorldLoc = fishLoc.transform.position; // or fishLoc.instance.transform.position</p><p>..the issue I am having is that it is not giving me back the actual position of the markers as is noted in the inspector when I look at the marker on the &#039;marker&#039; section of the map. The inspector values all seem accurate but I cannot get the same values via code when I am creating the items on the map. </p><p>Hopefully that all makes sense. ANy help appreciated!</p>]]></description>
			<author><![CDATA[null@example.com (d.arrenmacisaac)]]></author>
			<pubDate>Mon, 10 Jul 2023 19:51:04 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9105#p9105</guid>
		</item>
	</channel>
</rss>
