mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
11 lines
483 B
TypeScript
11 lines
483 B
TypeScript
import * as L from 'leaflet';
|
|
import 'leaflet-geocoder-mapzen';
|
|
|
|
const osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
|
const osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors';
|
|
const osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
|
const map = new L.Map('map', {layers: [osm], center: new L.LatLng(-37.7772, 175.2756), zoom: 15 });
|
|
|
|
// Add geocoding plugin
|
|
L.control.geocoder('search-MKZrG6M').addTo(map);
|