Hi Chris,<br><br>Thanks for your response.  Firstly the point of the excercise is to NOT use google maps, so using their API to present the osm maps seems like the wrong approach.  Actually we already have an example that uses the google api and the google tiles, but I was hoping to achieve an open source alternative approach.
<br><br>I think it's worth persuing this because an easily reusable solution to allow people to use osm maps with various overlays might be a good way to increase use of osm.  I know mashups are unpopular by the purists, but they're very popular with the public :)
<br><br><br><div><span class="gmail_quote">On 10/08/07, <b class="gmail_sendername">Christopher Schmidt</b> <<a href="mailto:crschmidt@metacarta.com">crschmidt@metacarta.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
You've commented out all the parts of the OpenStreetMap map options that<br>actually make the data geographically correct. That's probably a mistake<br>:)</blockquote><div><br>Yes, I was merging it towards the basic openlayers kml example to see where it broke.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">OpenStreetMap tile data is projected. In order to use it in OpenLayers,<br>you need to reproject all the data you are using -- OpenLayers does not
<br>support clientside reprojection. This means you have two options:<br><br> * Reproject your KML data. This means changing the coordinates from<br>   Lat/Lon to projected x/y coodinates in the "Google Projection":
<br>   <a href="http://spatialreference.org/ref/user/6/">http://spatialreference.org/ref/user/6/</a></blockquote><div><br>This seems the best option.  The OpenLayers/Format/KML.js file can be modified to translate the co-ordinates as they are read, but I'm not sure that I'm totally happy with this solution - it feels like a hack.  However it does work!
<br><br>In fact, using the same method I can load OSM data directly into a vector layer as well - see <a href="http://www.bristolbeat.co.uk/phpmap/openstreetmap2.html">http://www.bristolbeat.co.uk/phpmap/openstreetmap2.html
</a><br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> * Use different tiles. If you don't care about the projected/not<br>   projected data, you could set up a different, non-projected
<br>   datasource. If you'd like to go that route, I can even set one up for<br>   you -- I have an old one running under <a href="http://tilecache.org/demo.html">http://tilecache.org/demo.html</a><br>   , but I can set it up along with the other osgeo-hosted OSM layers
<br>   (Google Projection, Simple Mercator projection) that we have set up.</blockquote><div><br>I'm a little lost here - I have a bunch of layers in this latest demo and the only ones that don't work are the old Mapnik / Osmarender tiles.   
<br></div><br>Still, it seems a shame that we have to fudge the lat/lon values to the osm projection as this appears to break openlayers, or at least means that any extra layers will have to be hacked to change the co-ords.  It would seem better to make osm work with the standard co-ords, or am I missing something?
<br><br>mike<br><br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">There is, of course, the option of simply using Google Maps for your
<br>data. I'm sure someone can provide the right incantation to make Google<br>load OSM data, and Google will reproject KML to match their internal<br>projection.<br><br>If you'd like help with either of the first two, please reply and I can
<br>help you understand the technical stuff you might need to know to get<br>set up.<br><br>Regards,<br>--<br>Christopher Schmidt<br>MetaCarta<br></blockquote></div><br>