<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Wrong formated stringbuilder url resulting in bing 400 error]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=707&amp;type=atom" />
	<updated>2018-10-12T14:39:35Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=707</id>
		<entry>
			<title type="html"><![CDATA[Re: Wrong formated stringbuilder url resulting in bing 400 error]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=4033#p4033" />
			<content type="html"><![CDATA[<p>It&#039;s not a Unity bug - it&#039;s actually a bugfix which results in that issue:<br /><a href="https://feedback.unity3d.com/suggestions/fix-localization-issues-with-cor">https://feedback.unity3d.com/suggestion … s-with-cor</a></p>]]></content>
			<author>
				<name><![CDATA[s.eischer]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=818</uri>
			</author>
			<updated>2018-10-12T14:39:35Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=4033#p4033</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Wrong formated stringbuilder url resulting in bing 400 error]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=3095#p3095" />
			<content type="html"><![CDATA[<p>Some providers support multiple languages.<br />Use OnlineMaps.language to specify language code.<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMaps.html#acfcf450367cb2db65a9ed6b33477ddc1">http://infinity-code.com/doxygen/online … b33477ddc1</a></p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2017-12-04T12:09:15Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=3095#p3095</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Wrong formated stringbuilder url resulting in bing 400 error]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=3094#p3094" />
			<content type="html"><![CDATA[<p>This fixed it also. Thank you. <br />As far as this works for me right now, I wonder what would happen if you have language switching or something like that.</p>]]></content>
			<author>
				<name><![CDATA[Andy]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=596</uri>
			</author>
			<updated>2017-12-04T07:55:19Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=3094#p3094</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Wrong formated stringbuilder url resulting in bing 400 error]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=3056#p3056" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Most likely you or some other asset override current culture.<br />Or perhaps it&#039;s Unity Net 4.6 culture bug. <br />I did not see this bug, but yesterday I saw code that bypasses this, so this bug most likely exists.</p><p>Try this:<br /></p><div class="codebox"><pre><code>private void Awake() {
        Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo(&quot;en-US&quot;);
        Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(&quot;en-US&quot;);
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2017-11-24T12:09:13Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=3056#p3056</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Wrong formated stringbuilder url resulting in bing 400 error]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=3054#p3054" />
			<content type="html"><![CDATA[<p>Hi there,</p><p>I just wondered why in one project the elevation was built correctly and in the other it was not.<br />Both projects used the exact same parameters. I even included the scene from the working one as a test.</p><p>After serveral debugging logs I saw, that the url in the working project has the lat&amp;long values formatted correctly with &quot;.&quot;, whereas the one not working had it formatted with &quot;,&quot; - resulting in thinking the rest api receiving additional parameters.</p><p>I don&#039;t know why and where this wrong format is introduced... since as said, I used exact parameters, same plugin version etc.</p><p>As a workaround I wrote a little (clumsy) fix in OnlineMapsBingMapsElevation.cs:</p><div class="codebox"><pre><code> public override void GenerateURL(StringBuilder builder)
        {
            base.GenerateURL(builder);

            string bottomLatStr = (bottomLatitude.ToString()).Replace(&quot;,&quot;, &quot;.&quot;);
            string topLatStr = (topLatitude.ToString()).Replace(&quot;,&quot;, &quot;.&quot;);
            string leftLongStr= (leftLongitude.ToString()).Replace(&quot;,&quot;, &quot;.&quot;);
            string rightLongStr = (rightLongitude.ToString()).Replace(&quot;,&quot;, &quot;.&quot;);

            builder.Append(&quot;&amp;bounds=&quot;).Append(bottomLatStr).Append(&quot;,&quot;).Append(leftLongStr).Append(&quot;,&quot;).Append(topLatStr).Append(&quot;,&quot;).Append(rightLongStr);
            builder.Append(&quot;&amp;rows=&quot;).Append(rows).Append(&quot;&amp;cols=&quot;).Append(cols);
        }</code></pre></div><p>Best regards,<br />Andy</p>]]></content>
			<author>
				<name><![CDATA[Andy]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=596</uri>
			</author>
			<updated>2017-11-24T11:23:33Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=3054#p3054</id>
		</entry>
</feed>
