We will also create our own CSS file to create some basic styling for our
#map div that will contain the map. In
main.js, we will initialize Mapbox.js and provide our Mapbox access token. Then, we will create a simple map by providing the basic coordinates. Perform the following steps:
Open up the
chapter-4-example1-starterfolder. This folder contains an HTML5
cssfolder with a
style.cssfile, and a
main.jsfile. The project isn't linked to Mapbox.js yet; we will do this next.
style.cssfile contains some basic styling for the
#mapdiv. It will style the div with 100% width and 800px height, with no margins. This div will contain our map.
We will use