The steps I followed to achieve the application are:
- Load the
.tiff
file of L8 and L7 into studio and create saperate styles (L8 and L7) for each. - Make sure the loaded
.tiff
file is dragged below the other layers and publish them.
- Use the Swipe between maps GL JS example as a source to build this app.
- The above example is built using the mapbox-gl-compare function
- Replace the
accessToken
with your access tocken and give the appropriate style to before and after functions. - In this case
after style = L8 style ID
before style = L7 style ID
- Create two different geojson files for
before
function andafter
function to represent the 1999 and 2015 in the application.