rodolpheg

Untitled

Feb 10th, 2020
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. À mettre entre les balises <style></style> à l'intérieur des balises <head></head> :
  2.  
  3. <style>
  4. html, body {height: 100%; margin: 0;}
  5. #Carte { width: 100%; height: 100%; }
  6. </style>
  7.  
  8. À mettre entre les balises <body></body> :
  9.  
  10. <div id='Carte'></div>
  11.  
  12. À mettre entre les balises <script></script> à l'intérieur des balises <body></body> :
  13.  
  14. var maCarte = L.map('Carte');
  15. maCarte.setView([0,0], 2);
  16. var fondDeCarte = L.tileLayer('https://api.mapbox.com/styles/v1/mapbox/light-v10/tiles/{z}/{x}/{y}?access_token=VOTRE_TOKEN_MAPBOX').addTo(maCarte)
Advertisement
Add Comment
Please, Sign In to add comment