Basic examples
Using ViaMichelin Maps & Drive API
<head> <!-- Loading the API --> <script src="http://api.viamichelin.com/apijs/js/api.js"></script> <!-- Register --> <script>VMAPI.registerKey("JSBS20070201123465789");</script> </head>
To define language (roadmap, weather, POI search)
fra : Frenchgbr : English (Default value)
deu : German
ita : Italian
esp : Spanish
nld : Dutch
VMAPI.setLanguage("gbr"); Create a map
<html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>ViaMichelin Maps & Drive API</title> <script src="http://api.viamichelin.com/apijs/js/api.js" type="text/javascript"></script> <script type="text/javascript"> /* Insert your key */ VMAPI.registerKey("JSBS20070201123465789"); VMAPI.setLanguage("fra"); function affiche() { /* Create and display an VMMap object */ map = new VMMap(document.getElementById("yourmapdiv")); map.drawMap(new VMLonLat(-1.5748547260234285,43.47228979932601),10); map.showMapTools(); } </script> </head> <!-- Automatic script launch, after the page loading --> <body onload="affiche()"> <h1>ViaMichelin - Map example</h1> <p> Display a map in the page </p> <div id="yourmapdiv" style="width:400px; height:320px"></div> </body> </html>

