Harry Wood
home
>
maps
>
examples
> web-maps-lite >
CloudMade JavaScript API
CloudMade JavaScript API
<head> <title>CloudMade JavaScript API example</title> </head> <body> <input type="button" onclick="javascript:document.getElementById('panel').style.display = 'none'; map.checkResize();" value="<<Hide"> <input type="button" onclick="javascript:document.getElementById('panel').style.display = 'block'; map.checkResize();" value="Show>>"> <table width="800" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="300px"> <div id="panel" style="height:450px; padding-left:10px; width:300px; overflow:scroll;"></div> </td> <td width="100%"> <div id="cm-example" style="height:450px;"></div> </td> </tr> </table> <script type="text/javascript" src="http://tile.cloudmade.com/wml/0.2/web-maps-lite.js"></script> <script type="text/javascript"> var map = new CM.Map('cm-example', new CM.Tiles.CloudMade.Web({key: 'BC9A493B41014CAABB98F0471D759707'})); map.setCenter(new CM.LatLng(51.52119, -0.14184), 15); var directions = new CM.Directions(map, 'panel', 'BC9A493B41014CAABB98F0471D759707'); var waypoints = [new CM.LatLng(51.542, -0.11162), new CM.LatLng(51.539, -0.10497), new CM.LatLng(51.539, -0.11162), new CM.LatLng(51.536, -0.10497), new CM.LatLng(51.536, -0.11162), new CM.LatLng(51.533, -0.10497), new CM.LatLng(51.533, -0.11162), new CM.LatLng(51.530, -0.10497), new CM.LatLng(51.530, -0.11162), new CM.LatLng(51.527, -0.10497), new CM.LatLng(51.527, -0.11162), new CM.LatLng(51.524, -0.10497), new CM.LatLng(51.524, -0.11162), new CM.LatLng(51.521, -0.10497), new CM.LatLng(51.521, -0.11162) ]; directions.loadFromWaypoints(waypoints); </script> </body> </html>
view directly
Home
Blog
About
Maps
Other
Contact