Closed derekeder closed 9 months ago
Our new map has a legend: https://ilsolarmap.com/map2.html
I pulled the styles for it from this Mapbox-GL example: https://docs.mapbox.com/mapbox-gl-js/example/updating-choropleth/
However, the styles are not responsive and the absolute positioning makes the legend show up in awkward places, especially on mobile:
absolute
Map HTML code is here: https://github.com/chihacknight/il-solar-map/blob/main/index.html CSS is defined here: https://github.com/chihacknight/il-solar-map/blob/main/css/custom.css#L13 Javascript to dynamically set the legend: https://github.com/chihacknight/il-solar-map/blob/main/js/map.js#L91
Our new map has a legend: https://ilsolarmap.com/map2.html
I pulled the styles for it from this Mapbox-GL example: https://docs.mapbox.com/mapbox-gl-js/example/updating-choropleth/
However, the styles are not responsive and the
absolute
positioning makes the legend show up in awkward places, especially on mobile:Map HTML code is here: https://github.com/chihacknight/il-solar-map/blob/main/index.html CSS is defined here: https://github.com/chihacknight/il-solar-map/blob/main/css/custom.css#L13 Javascript to dynamically set the legend: https://github.com/chihacknight/il-solar-map/blob/main/js/map.js#L91