DefinitelyTyped/types/leaflet-routing-machine/leaflet-routing-machine-tests.ts
chanakadrathnayaka 10014f2625 Typescript definition for leaflet-routing-machine (#25249)
* Leaflet routing machine typing definition implementation :: Tested

* strictFunctionTypes set true

* Added typescript version

* Issue fixes

* Issue fixes

* Issue fixes

* Issue fixes

* Issue fixes

* Issue fixes
2018-04-25 12:15:52 -07:00

16 lines
398 B
TypeScript

import * as L from 'leaflet';
import 'leaflet-routing-machine';
const map: L.Map = L.map('map-container');
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
L.Routing.control({
waypoints: [
L.latLng(57.74, 11.94),
L.latLng(57.6792, 11.949)
]
}).addTo(map);