This PR implements a date picker for Planet Monthly Visual Basemaps. Closes #44.
Screenshots
What I changed
Installed, implemented, and configured a vue2-datepicker component (in lieu of HTML5 month field not being supported by all browsers, notably Firefox).
BasemapSelector component now emits a monthYear value upon change in the datepicker component.
Updated changeMapStyle function to use the monthYear value from the date picker instead of a hard-coded value in the style.
Max date value is set depending on if today's date >= 15. Planet publishes new visual basemaps on the 15th of each month. So if today's date >= 15, then maxMonth is the previous month; otherwise it is set to be two months prior.
Min date value is the earliest date Planet data became available.
Made a note that the Mapbox Satellite style is only up to a certain date.
What I'm not doing here
Visualizing the month selection via a slider. I want to make that a separate batch of work to be implemented in the future.
Goal
This PR implements a date picker for Planet Monthly Visual Basemaps. Closes #44.
Screenshots
What I changed
vue2-datepicker
component (in lieu of HTML5month
field not being supported by all browsers, notably Firefox).BasemapSelector
component now emits amonthYear
value upon change in the datepicker component.changeMapStyle
function to use themonthYear
value from the date picker instead of a hard-coded value in the style.maxMonth
is the previous month; otherwise it is set to be two months prior.What I'm not doing here
Visualizing the month selection via a slider. I want to make that a separate batch of work to be implemented in the future.