mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
type declarations and tests for the basic usage of leaflet-geocoder-mapzen. Does not include the advanced usage patterns: https://github.com/mapzen/leaflet-geocoder/#advanced-usage
11 lines
514 B
TypeScript
11 lines
514 B
TypeScript
/// <reference path="../leaflet/leaflet.d.ts" />
|
|
/// <reference path="leaflet-geocoder-mapzen.d.ts" />
|
|
|
|
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
|
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
|
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);
|