<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<blockquote
cite="mid:BANLkTikTOxu-V4W0eTJ9mWmbSZFZK9asHg@mail.gmail.com"
type="cite">
<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? </div>
</blockquote>
Yes, map picks up transformation of the base layer.<br>
<blockquote
cite="mid:BANLkTikTOxu-V4W0eTJ9mWmbSZFZK9asHg@mail.gmail.com"
type="cite">
<div>I'm confused because I transform my arbitrarily set center
via </div>
<div><br>
</div>
<blockquote style="margin: 0pt 0pt 0pt 40px; border: medium none;
padding: 0px;">
<div>map.setCenter(new OpenLayers.LonLat(-90, 38).transform(new
OpenLayers.Projection("EPSG:4326"),map.getProjectionObject()),12);</div>
</blockquote>
</blockquote>
That looks right.<br>
<blockquote
cite="mid:BANLkTikTOxu-V4W0eTJ9mWmbSZFZK9asHg@mail.gmail.com"
type="cite">
<blockquote style="margin: 0pt 0pt 0pt 40px; border: medium none;
padding: 0px;">
</blockquote>
<div><br>
</div>
<div>but I transform my re-set center (after geolocating) via</div>
<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>
This should give you temp in long/lat. But why using 900913 instead
of map.getProjectionObject()?<br>
<blockquote
cite="mid:BANLkTikTOxu-V4W0eTJ9mWmbSZFZK9asHg@mail.gmail.com"
type="cite">
<blockquote style="margin: 0pt 0pt 0pt 40px; border: medium none;
padding: 0px;">
</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: 0pt 0pt 0pt 40px; border: medium 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>
</blockquote>
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.<br>
<br>
<blockquote
cite="mid:BANLkTikTOxu-V4W0eTJ9mWmbSZFZK9asHg@mail.gmail.com"
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>
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></body>
</html>