2009/3/23 Yann Coupin <y...@coupin.net>: > Bon allez, j'ai fait le boulo à ta place...
:-) > str = > document.getElementById('link').attributes.getNamedItem('href').value Merci ! Une version qui plaira j'espère : ===== début ===== <!-- Source code under Public Domain --> <html> <head> <title>GoogleMaps to OSM bookmarklet</title> </head> <body> <a href='javascript:var str = document.getElementById("link").attributes.getNamedItem("href").value; if (!str) { str = location.href }; if (str) { var zoom = "2"; var res = (new RegExp("z=([0-9]+)","")).exec(str); if (res) var zoom = res[1]; var lat = "0.0"; var lon = "0.0"; var res = (new RegExp("(\\?|&)s?ll=(-?[0-9]+\.[0-9]+),(-?[0-9]+\.[0-9]+)","")).exec(str); if (res) { var lat = res[2]; var lon = res[3]; } location.href = "http://openstreetmap.org/?lat="+lat+"&lon="+lon+"&zoom="+zoom; } else undefined;'>Google Maps to OSM bookmarklet</a> </body> </html> ===== fin ===== Amicalement, d. _______________________________________________ Talk-fr mailing list Talk-fr@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk-fr