Closed bravemaster3 closed 2 years ago
How did u customizer the layer control ? I have been trying to figure it out but to no avail .
How did u customizer the layer control ? I have been trying to figure it out but to no avail .
You can have a look at my project files here: https://github.com/bravemaster3/Geospatial-project1 , and I will be glad to explain if you still face any challenges...
Basically, I did not use the LayerControl from Leaflet. Instead, starting from something like the toolbox Eugene helped us create, I used the checkboxes, and wrote some javascript codes for which layer to display on "checked" state. Then, I also added radio buttons and did something a bit different for the base layers since only one radio button can be selected at the same time.
Then, for toggling the legend/toobox, it is just a div containing the image, which lies below the toolbox. Then, some CSS to hide and show the legend box on hover...
Ok. Will check it out and try .
How did u customizer the layer control ? I have been trying to figure it out but to no avail .
You can have a look at my project files here: https://github.com/bravemaster3/Geospatial-project1 , and I will be glad to explain if you still face any challenges...
Basically, I did not use the LayerControl from Leaflet. Instead, starting from something like the toolbox Eugene helped us create, I used the checkboxes, and wrote some javascript codes for which layer to display on "checked" state. Then, I also added radio buttons and did something a bit different for the base layers since only one radio button can be selected at the same time.
Then, for toggling the legend/toobox, it is just a div containing the image, which lies below the toolbox. Then, some CSS to hide and show the legend box on hover...
Please can you deploy the app on GIT hub and send the link
I did already, and the link was in the original post https://bravemaster3.github.io/Geospatial-project1 The link you saw was in a response to MegaBoy
I did already, and the link was in the original post https://bravemaster3.github.io/Geospatial-project1 The link you saw was in a response to MegaBoy
Sorry , i missed it . Good Job . Keep it up
Thank you very much.
Here is my first complete assignment. https://bravemaster3.github.io/Geospatial-project1 Note that though I understood how to use overlay and basemaps in layerControl, I still chose to personalize everything. That is because I don't know how to personalize the checkboxes when using leaflet's layerControl. However, by writing codes to do these things myself, it was a good practice of some javascript for me. Thanks, Koffi