2 <html xmlns="http://www.w3.org/1999/xhtml">
5 <title>OpenStreetMap Embedded</title>
6 <style type="text/css">
21 <link href="/assets/leaflet.css" media="screen" rel="stylesheet" type="text/css">
23 <link href="/assets/leaflet.ie.css" media="screen" rel="stylesheet" type="text/css" />
25 <script src="/assets/leaflet.js"></script>
26 <script src="/assets/leaflet.osm.js"></script>
32 var query = (window.location.search || '?').substr(1),
35 query.replace(/([^&=]+)=?([^&]*)(?:&+|$)/g, function(match, key, value) {
36 value = value.split(",");
37 if (value.length == 1)
42 var map = L.map("map");
43 map.attributionControl.setPrefix('');
45 if (!args.layer || args.layer == "mapnik" || args.layer == "osmarender") {
46 new L.OSM.Mapnik().addTo(map);
47 } else if (args.layer == "cyclemap" || args.layer == "cycle map") {
48 new L.OSM.CycleMap().addTo(map);
49 } else if (args.layer == "transportmap") {
50 new L.OSM.TransportMap().addTo(map);
51 } else if (args.layer == "mapquest") {
52 new L.OSM.MapQuestOpen().addTo(map);
56 L.marker(args.marker).addTo(map);
60 map.fitBounds([L.latLng(args.bbox[1], args.bbox[0]),
61 L.latLng(args.bbox[3], args.bbox[2])])