I am kind of a beginner. I have exported my webmap using QGIS2Web and while playing with it, I was able to change the settings of the items already present on the map (for example position, language, zoom levels, etc.) Although, I would like to add some functions to it.
I want to add the Leaflet.Dialog plugin (https://github.com/NBTSolutions/Leaflet.Dialog), but I'm failing somewhere. In my export folder, I added both the .css and .js to the project and imported it with a link and script tag.
I then added this to the index.html :
var dialog = L.control.dialog(options) .setContent("<p>Hello! Welcome to your nice new dialog box!</p>") .addTo(map);
Why does this code not show anything?
Here is the code to link the plugin :
<link rel="stylesheet" href="css/Leaflet.Dialog.css"> <script src="js/Leaflet.Dialog.js"></script>