Files
leaflet/docs/examples/extending/watermark.md
Florian Bischof 20654cd159 Replace Mapbox with OpenStreetMap (#7818)
* Replace Mapbox with OpenStreetMap

Replace Mapbox with OpenStreetMap

* Revert Gemfile

* Replace blanks with tabs

* Fix lint

* Replace Mapbox with OSM

* Add OSM Tile Usage Policy link

* typo: productive→production

Co-authored-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
2022-05-27 11:33:15 +03:00

797 B

layout, title
layout title
tutorial_frame Watermark control
<script type='text/javascript'> var map = L.map('map', { center: [40, 0], zoom: 1 }); var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 19, attribution: '© OpenStreetMap' }).addTo(map); L.Control.Watermark = L.Control.extend({ onAdd: function (map) { var img = L.DomUtil.create('img'); img.src = '../../docs/images/logo.png'; img.style.width = '200px'; return img; }, onRemove: function (map) { // Nothing to do here } }); L.control.watermark = function (opts) { return new L.Control.Watermark(opts); }; var watermarkControl = L.control.watermark({position: 'bottomleft'}).addTo(map); </script>