Leaflet

Eine Übersicht für Leaflet.

Links:

Bibliotheken:

Snippets

// OSM-Layer hinzufügen
map.addLayer(new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'))

// Zu Rechteck zoomen
map.fitBounds([ [49.6107, 6.6797], [47.9899, 9.8438] ])

// Koordinaten der linken oberen Ecke einer Kachel
L.CRS.EPSG3857.pointToLatLng({x:531*256,y:349*256}, 10)  // Kachel 10/531/349

// Rechteck
L.rectangle([ [49.6107, 6.6797], [47.9899, 9.8438] ], {color: 'blue', fillColor: 'transparent', weight: 2, opacity:0.5, dashArray: [4,4], lineCap: 'butt'}).addTo(map)

// Kreis
L.circleMarker([ 49.0118093, 8.4392715 ], {color: 'orange'}).addTo(map)

// Polyline
L.polyline([ [49.6107, 6.6797], [47.9899, 9.8438] ], { clickable: false })