Hi Phil,<br><br><div>I was confused because console.log(map.projection) returned EPSG:4326, I expected this to be updated with the OSM layer, I guess I don't fully understand how that works</div><div><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div bgcolor="#ffffff" text="#000000"><div class="im"><blockquote type="cite"><div><br>
</div>
<blockquote style="margin:0pt 0pt 0pt 40px;border:medium none;padding:0px">
<div>var temp = map.getCenter().transform(new
OpenLayers.Projection("EPSG:900913"),new
OpenLayers.Projection("EPSG:4326"));</div>
</blockquote>
</blockquote></div>
This should give you temp in long/lat. But why using 900913 instead
of map.getProjectionObject()?</div></blockquote><div><br></div><div>In this case the map.getProjectionObject() wasn't working and would break the get request to the twitter API, this code returned valid results, or so I assume.</div>
<div><br></div><div>Your explanation makes sense, I have to transform the points myself, It might work just to reverse the coords and then transform. if the transform function is expecting lon-lat, I've been passing it lat-long...</div>
<div><br></div><div>thansk!</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div bgcolor="#ffffff" text="#000000">What are values of position.coords.longitude/latitude? It makes
sense that you have to transform lat/long<br>
to plot them on the OSM projection. In WMS/WFS you are relying on
the server to transform things to required projection (OL doesnt)
but here you have to it yourself. It is really at 0,0 - I would
expect coords in range of -180:180,-90:90 to plot near zero on a map
with coordinate range of -2E6:-2E6:2E6:2E6.<div class="im"><br>
<br>
<blockquote type="cite">
<blockquote style="margin:0pt 0pt 0pt 40px;border:medium none;padding:0px">
<div>
</div>
</blockquote>
<br>
<div><br>
</div>
<div>Finally, I'm pulling in coordinates from the twitter search
api, and I can verify that they're in lat-lon, and getting
passed to my point. The issue is that they're getting places at
0,0. Clearly this is because they're not being properly
transformed before getting added to the layer, BUT when I apply
any of the previous methods to transform the point, my lat value
gets corrupted into a NAN.</div>
</blockquote></div>
As above, you have to transform them yourself. The only obvious
thing that I can think of is lat/long are round the wrong way. If
you pass -90,334 as a latitude then you would get a NaN. <br>
<br>
<p><span style="font-family:'Arial';font-size:8pt;color:#000000">Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.</span></p>
<p><span style="font-family:'Arial';font-size:8pt;color:#000000"> </span></p></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
<br></blockquote></div><br></div>