UNPKG

2gis-maps

Version:

Interactive 2GIS maps API, based on Leaflet

32 lines (28 loc) 837 B
<!DOCTYPE html> <html> <head> <meta charset='utf-8'> <title>DGTraffic demo</title> <script src="http://maps.api.2gis.dev/2.0/loader.js"></script> <style type="text/css"> html,body { height: 100%; margin: 0; padding: 0; } #map { width: 100%; height: 100%; } </style> </head> <body> <div id="map"></div> <script type="text/javascript"> var map; DG.then(function () { map = new DG.Map('map', { "center": new DG.LatLng(54.95070983406191, 83.0569839477539), "zoom": 11, "geoclicker": false, key: DG.config.key || 'Your API access key' }); var traffic = new DG.Traffic(); map.addLayer(traffic); }); </script> </body> </html>