<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — How to retrieve stored xml data for the markers at any given time]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=146&amp;type=atom" />
	<updated>2016-07-13T17:12:47Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=146</id>
		<entry>
			<title type="html"><![CDATA[Re: How to retrieve stored xml data for the markers at any given time]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=833#p833" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Alex Vertax wrote:</cite><blockquote><p>Hello.</p><div class="codebox"><pre><code>OnlineMapsMarker randomMarker = OnlineMaps.instance.markers[Random.Range(0, OnlineMaps.instance.markers.Length)];</code></pre></div></blockquote></div><p>Yo! Thank you so so much. That works 100%</p><p>You have really helped us with everything related with maps in our project. Will send you link soon as it&#039;s available to download.</p><p>Rock on!</p>]]></content>
			<author>
				<name><![CDATA[luke.carelsen]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=117</uri>
			</author>
			<updated>2016-07-13T17:12:47Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=833#p833</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to retrieve stored xml data for the markers at any given time]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=830#p830" />
			<content type="html"><![CDATA[<p>Hello.</p><div class="codebox"><pre><code>OnlineMapsMarker randomMarker = OnlineMaps.instance.markers[Random.Range(0, OnlineMaps.instance.markers.Length)];</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-07-13T09:48:27Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=830#p830</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to retrieve stored xml data for the markers at any given time]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=828#p828" />
			<content type="html"><![CDATA[<p>Yo Peeps!</p><p>So we are so close to finishing our project, I&#039;m just stuck on something. I&#039;m trying to grab a random marker for the purpose of then zooming to the correct place, or pulling certain info from it. If i look in the inspector i can see that online maps script as markers in 2d marker section. So i have no idea how i can get a random marker from the onlinmaps script or from the xml.</p><p>Please if anyone can provide a solution to this issue it would be much appreciated.</p><p>thank you for taking the time to read this.</p><p>Rock on!</p>]]></content>
			<author>
				<name><![CDATA[luke.carelsen]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=117</uri>
			</author>
			<updated>2016-07-12T17:00:01Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=828#p828</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to retrieve stored xml data for the markers at any given time]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=637#p637" />
			<content type="html"><![CDATA[<p>ohhhhh thats how you do it. Thanks a million!!!!</p><p>Rock on!</p>]]></content>
			<author>
				<name><![CDATA[luke.carelsen]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=117</uri>
			</author>
			<updated>2016-04-25T09:24:28Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=637#p637</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to retrieve stored xml data for the markers at any given time]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=636#p636" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Example:<br /></p><div class="codebox"><pre><code>// Creating markers.
for (int i = 0; i &lt; 10; i++)
{
    OnlineMapsMarker marker = OnlineMaps.instance.AddMarker(0, 0);
    OnlineMapsXML node = new OnlineMapsXML(&quot;Data&quot;);
    node.Create(&quot;Field&quot;, i);
    marker.customData = node;
}

// Combines customData.
OnlineMapsXML markersXML = new OnlineMapsXML(&quot;Total&quot;);
foreach (OnlineMapsMarker marker in OnlineMaps.instance.markers)
{
    OnlineMapsXML node = marker.customData as OnlineMapsXML;
    if (node != null)
    {
        XmlElement newNode = node.element;
        if (node.document != markersXML.document) newNode = markersXML.document.ImportNode(newNode, true) as XmlElement;
        markersXML.AppendChild(newNode);
    }
}

Debug.Log(markersXML.outerXml);</code></pre></div><p>A little explanation: When you add a node, it must be of the same owned document.<br />Starting from Online Maps v2.4.0.32 (when it will be available), you will not need to control this. <br />Verification will occur automatically.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-04-24T20:08:09Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=636#p636</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to retrieve stored xml data for the markers at any given time]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=635#p635" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Alex Vertax wrote:</cite><blockquote><p>Hello.</p><p>Unfortunately, I did not understand your question.<br />Please rephrase it.</p></blockquote></div><p>let me rephrase.</p><p>So we are creating a marker with customXML data. We query a AWS DB and the markers are created when the data is returned. So we are assuming that all the data is stored in an xml. </p><p>Had a look at the documentation and we believe that the OnlineMapsXMLList Class can be used to retrieve a list of all the entries that exist in the XML. <br />Looking into using &quot;Create wrapper for XmlNodeList.&quot; all the example show that you need to provide the location of the XML file.</p><p>I do not know how to access the xml data on all the markers populated on the map.</p><p>Please can you assist with an example as to how we can retrieve the data?</p><p>Kind Regards</p>]]></content>
			<author>
				<name><![CDATA[luke.carelsen]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=117</uri>
			</author>
			<updated>2016-04-24T09:26:26Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=635#p635</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to retrieve stored xml data for the markers at any given time]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=632#p632" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Unfortunately, I did not understand your question.<br />Please rephrase it.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-04-22T12:24:12Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=632#p632</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[How to retrieve stored xml data for the markers at any given time]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=631#p631" />
			<content type="html"><![CDATA[<p>Hey Peeps</p><p>What we have done is a map with markers and custom xml data which are currently populated. What want to know is, can the xml be accessed at any point to retrieve a list of all the existing markers data?</p><p>sorry for being a complete noob but if anyone can provide a little bit of code sample that would really help me out.</p><p>Thank you for your time.</p><p>Kind regards</p>]]></content>
			<author>
				<name><![CDATA[luke.carelsen]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=117</uri>
			</author>
			<updated>2016-04-22T10:07:12Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=631#p631</id>
		</entry>
</feed>
