Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sahilrajput03/learn-leaflet
https://github.com/sahilrajput03/learn-leaflet
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/sahilrajput03/learn-leaflet
- Owner: sahilrajput03
- Created: 2023-03-03T14:51:51.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-22T13:37:10.000Z (over 1 year ago)
- Last Synced: 2024-11-09T17:59:02.672Z (about 2 months ago)
- Language: JavaScript
- Size: 24.4 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Learn Leaflet
- My Leaflet Notes: [Click here](https://github.com/sahilrajput03/sahilrajput03/blob/master/learn-leaflet.md)
```js
// create rectangle
// L.rectangle( latLngBounds, options?)// https://haneefputtur.com/javascript-to-create-rectangle-based-on-a-longitude-latitude-in-leaflet.html
function DrawCircle(lat, lng) {
var circle = L.circle([lat, lng], {
color: "red",
fillColor: "#f03",
fillOpacity: 0.0,
radius: 6000.0
}).addTo(map);
group.addLayer(circle);
var rectangle = L.rectangle(circle.getBounds(), {
stroke: false,
fill: true,
color: '#00f',
opacity: 0.1
}).addTo(map);
group.addLayer(rectangle);
}
```