Hi all,<div><br></div><div>Still messing around with the geolocation API. I&#39;ve been playing with the jquery getJSON function for cross-domain requests and I&#39;m running into an issue that I think is related to the coordinate system of my map, which is using OSM as a baselayer.</div>
<div><br></div><div>Essentially I&#39;m trying to apply holdener&#39;s nearby tweet&#39;s and I&#39;m getting a 403 error from the getJSON function. I think this is because I&#39;m not transforming the map.getCenter() properly, and I assume that the twitter API uses Google&#39;s EPSG 900913 as a default.</div>
<div><br></div><div>this is the function I&#39;m using to create the search URL </div><div><br></div><div><div>function createTWTsrcURL (){</div><div>var temp = map.getCenter().transform(new OpenLayers.Projection(&quot;EPSG:900913&quot;),map.getProjectionObject());</div>
<div>return &#39;<a href="http://search.twitter.com/search.json">http://search.twitter.com/search.json</a>&#39; + refreshQuery + &#39;&amp;geocode=&#39; + temp.lat +&#39;%2C&#39; + temp.lon + &#39;%2C50km&amp;rpp=100&amp;callbacl=?&#39;;</div>
<div>}</div></div><div><br></div><div>You can see from the get string which is producing the 403 error (Forbidden) that the script isn&#39;t passing Lat-Longs to the search API, which might be causing this error.</div><div>
<span class="Apple-style-span" style="color: rgb(255, 0, 0); font-family: Consolas, &#39;Lucida Console&#39;, monospace; font-size: 12px; white-space: pre-wrap; "><a href="http://search.twitter.com/search.json?=&amp;geocode=4579425.8122326%2C-10018754.17%2C50km&amp;rpp=100&amp;callbacl=jQuery16105243276595138013_1308594913395&amp;_=1308595036601" class="webkit-html-resource-link" title="http://search.twitter.com/search.json?=&amp;geocode=4579425.8122326%2C-10018754.17%2C50km&amp;rpp=100&amp;callbacl=jQuery16105243276595138013_1308594913395&amp;_=1308595036601" style="box-sizing: border-box; color: rgb(84, 84, 84); cursor: pointer; max-width: 100%; ">http://search.twitter.com/search.json?=&amp;geocode=4579425.8122326%2C-10018754.17%2C50km&amp;rpp=100&amp;callbacl=jQuery16105243276595138013_1308594913395&amp;_=1308595036601</a> </span></div>
<div><span class="Apple-style-span" style="color: rgb(255, 0, 0); font-family: Consolas, &#39;Lucida Console&#39;, monospace; font-size: 12px; white-space: pre-wrap; "><br></span></div><div><span class="Apple-style-span" style="font-size: 12px; white-space: pre-wrap; "><font class="Apple-style-span" face="arial, helvetica, sans-serif">I&#39;m sure I&#39;m not transforming it correctly, even if that&#39;s not what is causing the 403 error. Any ideas?</font></span></div>