Hi all,<div><br></div><div>I'm using a map with no options and an OSM base layer. Am I right is assuming that the map inherits OSM's projection of 900913? I'm confused because I transform my arbitrarily set center via </div>
<div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>map.setCenter(new OpenLayers.LonLat(-90, 38).transform(new OpenLayers.Projection("EPSG:4326"),map.getProjectionObject()),12);</div>
</blockquote><div><br></div><div>but I transform my re-set center (after geolocating) via</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>var temp = map.getCenter().transform(new OpenLayers.Projection("EPSG:900913"),new OpenLayers.Projection("EPSG:4326"));</div>
</blockquote><div><br></div><div>in order to be able to feet the twitter search api a set of coordinates that it understands. And further confusing me is the necessity to reproject the coords that I'm pulling into from the geolocation API, as theoretically they're already in EPSG 4326 (WGS 1984)</div>
<div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>var feat = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(position.coords.longitude,position.coords.latitude).transform(new OpenLayers.Projection("EPSG:4326"),map.getProjectionObject()),14);</div>
</div></blockquote><div><br></div><div>yet without the transform the points get dumped at 0,0. </div><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>
<div><br></div><div><div>if (tweet.geo){</div><div>var lon = tweet.geo.coordinates[0];</div><div>var lat = tweet.geo.coordinates[1];</div><div>tweet.point = new OpenLayers.Geometry.Point(lon,lat);</div></div><div>}</div><div>
// in another function</div><div><div>var twtfeat = new OpenLayers.Feature.Vector(tweet.point);</div><div>tweetz.addFeatures(twtfeat);</div></div><div><br></div><div>how do I work around this?</div><div><br></div>