DefinitelyTyped/types/mapbox-gl-leaflet/mapbox-gl-leaflet-tests.ts
Alexey Gorshkov f0bf0a7cef added typings for mapbox-gl-leaflet (#25120)
* added typings for mapbox-gl-leaflet

* fixed build errors
2018-04-19 11:16:02 -07:00

15 lines
358 B
TypeScript

import * as L from 'leaflet';
const token = 'token';
const map = L.map('map').setView([38.912753, -77.032194], 15);
L.marker([38.912753, -77.032194])
.bindPopup("Hello <b>Leaflet GL</b>!<br>Whoa, it works!")
.addTo(map)
.openPopup();
const gl = L.mapboxGL({
accessToken: token,
style: 'mapbox://styles/mapbox/bright-v8'
}).addTo(map);