How to install? #294
Unanswered
warrenbreedlove
asked this question in
Q&A
Replies: 1 comment
-
I had the same question/experience. here's the steps I followed to get mine working. if I remember I'll update this to link to my project when I upload it. setup:
steps:
<html>
<head>
<!-- leaflet css -->
<!-- leaflet js -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
<script src="./js/leaflet-sidebar.js"></script>
<link rel="stylesheet" href="./css/leaflet-sidebar.css" />
<style>
#map { height: 100%; }
</style>
</head>
<body>
<div id="map"></div>
<!-- copy #sidebar div from example html -->
<script>
// ...
var map = L.map('map', {center: 0, zoom: 0, maxBounds: maxBounds}).fitBounds(maxBounds);
// add layers or whatever
L.control.sidebar('sidebar', {position: 'right'}).addTo(map); // from example html
</script>
</body>
</html> directory structure: $ tree
.
├── css
│ └── leaflet-sidebar.css
├── index.html
├── js
│ └── leaflet-sidebar.js seems to be working for me, needs some slight css adjustments but otherwise functional |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My coding and js skills are pretty weak. I was wondering if anyone could help by giving a little explanation of how to install this plugin into an existing leaflet project. Thanks! Im guessing its as simple as dragging and dropping some files in the right spots then linking in in the main html but nothing i try has worked thus far. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions