Index: tests/Format/KML.html
===================================================================
--- tests/Format/KML.html	(revision 9962)
+++ tests/Format/KML.html	(working copy)
@@ -9,7 +9,7 @@
     var test_nl = '<kml xmlns="http://earth.google.com/kml/2.2"> <Document> <NetworkLink> <Link> <href>http://maker.geocommons.com/maps/1717/overlays/0</href> </Link> </NetworkLink> </Document></kml>';
 
     function test_Format_KML_constructor(t) { 
-        t.plan(4); 
+        t.plan(5); 
          
         var options = {'foo': 'bar'}; 
         var format = new OpenLayers.Format.KML(options); 
@@ -18,6 +18,8 @@
         t.eq(format.foo, "bar", "constructor sets options correctly"); 
         t.eq(typeof format.read, "function", "format has a read function"); 
         t.eq(typeof format.write, "function", "format has a write function");
+        t.eq(format.externalProjection.projCode, "EPSG:4326", 
+             "default external projection is EPSG:4326"); 
     }
 
     function test_Format_KML_read(t) {
Index: tests/Format/GPX.html
===================================================================
--- tests/Format/GPX.html	(revision 9962)
+++ tests/Format/GPX.html	(working copy)
@@ -6,7 +6,7 @@
     var gpx_data = '<?xml version="1.0" encoding="ISO-8859-1"?><gpx version="1.1" creator="Memory-Map 5.1.3.715 http://www.memory-map.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.topografix.com/GPX/1/1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"><wpt lat="51.3697845627" lon="-0.1853562259"><name>Mark</name><sym><![CDATA[Flag]]></sym><type><![CDATA[Marks]]></type></wpt><rte><name><![CDATA[Route8]]></name><type><![CDATA[Route]]></type><rtept lat="51.3761803674" lon="-0.1829991904"><name><![CDATA[WP0801]]></name><sym><![CDATA[Dot]]></sym><type><![CDATA[Waypoints]]></type></rtept><rtept lat="51.3697894659" lon="-0.1758887005"><name><![CDATA[WP0802]]></name><sym><![CDATA[Dot]]></sym><type><![CDATA[Waypoints]]></type></rtept><rtept lat="51.3639790884" lon="-0.1833202965"><name><![CDATA[WP0803]]></name><sym><![CDATA[Dot]]></sym><type><![CDATA[Waypoints]]></type></rtept><rtept lat="51.3567607069" lon="-0.1751119509"><name><![CDATA[WP0804]]></name><sym><![CDATA[Dot]]></sym><type><![CDATA[Waypoints]]></type></rtept></rte><trk><name><![CDATA[Track]]></name><type><![CDATA[Track]]></type><trkseg><trkpt lat="51.3768216433" lon="-0.1721292044"></trkpt><trkpt lat="51.3708337670" lon="-0.1649230916"></trkpt><trkpt lat="51.3644368725" lon="-0.1736741378"></trkpt><trkpt lat="51.3576354272" lon="-0.1662595250"></trkpt></trkseg></trk></gpx>';
     
     function test_Format_GPX_constructor(t) { 
-        t.plan(4); 
+        t.plan(5); 
          
         var options = {'foo': 'bar'}; 
         var format = new OpenLayers.Format.GPX(options); 
@@ -15,6 +15,8 @@
         t.eq(format.foo, "bar", "constructor sets options correctly"); 
         t.eq(typeof format.read, "function", "format has a read function"); 
         t.eq(typeof format.write, "function", "format has a write function"); 
+        t.eq(format.externalProjection.projCode, "EPSG:4326", 
+             "default external projection is EPSG:4326"); 
     }
     function test_Format_GPX_read(t) {
         t.plan(4);
Index: tests/Format/OSM.html
===================================================================
--- tests/Format/OSM.html	(revision 9962)
+++ tests/Format/OSM.html	(working copy)
@@ -5,7 +5,7 @@
     <script type="text/javascript">
     
     function test_Format_OSM_constructor(t) { 
-        t.plan(4); 
+        t.plan(5); 
          
         var options = {'foo': 'bar'}; 
         var format = new OpenLayers.Format.OSM(options); 
@@ -14,6 +14,8 @@
         t.eq(format.foo, "bar", "constructor sets options correctly"); 
         t.eq(typeof format.read, "function", "format has a read function"); 
         t.eq(typeof format.write, "function", "format has a write function"); 
+        t.eq(format.externalProjection.projCode, "EPSG:4326", 
+             "default external projection is EPSG:4326"); 
     } 
     function test_Format_OSM_node(t) {
         t.plan(4);
Index: lib/OpenLayers/Format/KML.js
===================================================================
--- lib/OpenLayers/Format/KML.js	(revision 9962)
+++ lib/OpenLayers/Format/KML.js	(working copy)
@@ -11,6 +11,7 @@
  * @requires OpenLayers/Geometry/Collection.js
  * @requires OpenLayers/Request/XMLHttpRequest.js
  * @requires OpenLayers/Console.js
+ * @requires OpenLayers/Projection.js
  */
 
 /**
@@ -122,6 +123,9 @@
             kmlIconPalette: (/root:\/\/icons\/palette-(\d+)(\.\w+)/),
             straightBracket: (/\$\[(.*?)\]/g)
         };
+        // KML coordinates are always in longlat WGS84
+        this.externalProjection = new OpenLayers.Projection("EPSG:4326");
+
         OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
     },
 
Index: lib/OpenLayers/Format/GPX.js
===================================================================
--- lib/OpenLayers/Format/GPX.js	(revision 9962)
+++ lib/OpenLayers/Format/GPX.js	(working copy)
@@ -7,6 +7,7 @@
  * @requires OpenLayers/Feature/Vector.js
  * @requires OpenLayers/Geometry/Point.js
  * @requires OpenLayers/Geometry/LineString.js
+ * @requires OpenLayers/Projection.js
  */
 
 /**
@@ -53,6 +54,9 @@
      *     this instance.
      */
     initialize: function(options) {
+        // GPX coordinates are always in longlat WGS84
+        this.externalProjection = new OpenLayers.Projection("EPSG:4326");
+
         OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
     },
     
Index: lib/OpenLayers/Format/OSM.js
===================================================================
--- lib/OpenLayers/Format/OSM.js	(revision 9962)
+++ lib/OpenLayers/Format/OSM.js	(working copy)
@@ -8,6 +8,7 @@
  * @requires OpenLayers/Geometry/Point.js
  * @requires OpenLayers/Geometry/LineString.js
  * @requires OpenLayers/Geometry/Polygon.js
+ * @requires OpenLayers/Projection.js
  */
 
 /**  
@@ -73,6 +74,9 @@
             area[layer_defaults.areaTags[i]] = true;
         }
         layer_defaults.areaTags = area;
+
+        // OSM coordinates are always in longlat WGS84
+        this.externalProjection = new OpenLayers.Projection("EPSG:4326");
         
         OpenLayers.Format.XML.prototype.initialize.apply(this, [layer_defaults]);
     },
