Leigh,<div><br></div><div>Maybe the problem is in this line:</div><div>var sphermerc = new OpenLayers.Projection("900913"<u></u>);</div><div><br></div><div>Is missing the "EPSG:" before the 900913</div>
<div><br></div>Fernando G. Norte<br>BHte - MG<br>cel: +55 31 9119 8814<br>-------------------------<br>MSN e Gtalk # <a href="mailto:fnorte@gmail.com">fnorte@gmail.com</a><br>
<br><br><div class="gmail_quote">2011/12/22 Leigh Holcombe <span dir="ltr"><<a href="mailto:lholcombe@triple-bypass.net">lholcombe@triple-bypass.net</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
I'm trying to add some WGS84 points to a spherical mercator map. After studying examples and reading some documentation, I've been led to believe that the following code should work. And yet, it does not.<br>
<br>
var wgs84 = new OpenLayers.Projection("EPSG:<u></u>4326");<br>
var sphermerc = new OpenLayers.Projection("900913"<u></u>);<br>
// vector points overlay<br>
var pointslayer = new OpenLayers.Layer.Vector("<u></u>Points Layer", {<br>
styleMap: stylepoint,<br>
displayInLayerSwitcher: false<br>
});<br>
// define the points<br>
var start = new OpenLayers.Geometry.Point(-<u></u>157, 21);<br>
start.transform(wgs84, sphermerc);<br>
var startfeature = new OpenLayers.Feature.Vector(<u></u>start);<br>
pointslayer.addFeatures([<u></u>startfeature]);<br>
<br>
map.addLayer(pointslayer);<br>
<br>
This isn't all of the code, but I'm pretty sure it's the only part that isn't working. I think the reason I can't figure this out is that I don't quite understand how transforming "in place" works. Which version of 'start' is being passed to OpenLayers.Feature.Vector: the original, or the transformed?<br>
<br>
Code ideas and/or explanatory speeches (of any length) would be greatly appreciated.<br>
<br>
Thank you,<br>
Leigh Holcombe<br>
<br>
<br>
______________________________<u></u>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org" target="_blank">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/openlayers-<u></u>users</a><br>
</blockquote></div><br>