UNPKG

2gis-maps

Version:

Interactive 2GIS maps API, based on Leaflet

33 lines (31 loc) 933 B
<!DOCTYPE html> <html> <head> <meta charset='utf-8'> <title>DGRuler demo</title> <script src="http://maps.api.2gis.ru/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"> DG.then(function () { map = new DG.Map('map', { 'center': new DG.LatLng(51.73028, 36.19389), 'zoom': 17, key: DG.config.key || 'Your API access key' }); var latLngs = [ [51.7314, 36.1938], [51.7307, 36.1894], [51.7297, 36.1926], [51.7299, 36.1968], [51.7307, 36.1968]] DG.ruler(latLngs).addTo(map); }); </script> </body> </html>