To Do This Week:
Gather info and plan Mapbox projects.
Module Notes
Elit Projects DUE this Wed Feb 26
- Folder is “elit”, use “index.html”, no uppercase letter or spaces!
- Always include a title, author name, and date on projects!
- If needed, include an explanation for interaction.
- Make your steps in the statement reflect the order for JS to build the script – use lists. No need to include HTML and CSS setup in the steps.
Map Project: DUE March 19
Place index.html
in a folder called map
. Validate your HTML and CSS, then upload your project to a server. Submit the URL through your course management system.
Student Map Projects:
- https://dtc-wsuv.org/amelo20/map/
- https://dtc-wsuv.org/jnguyen23/map/
- https://dtc-wsuv.org/ashannon23/map/
- https://dtc-wsuv.org/jstephens23/map/
- https://dtc-wsuv.org/hgebhart23/map/
- https://dtc-wsuv.org/sguo23/map/
- https://dtc-wsuv.org/nellis23/map/
Map Ideas:
Explore Mapbox GL JS examples.
Mapbox Styles:
Mapbox Styles Gallery | Mapbox Studio
Objects, JSON, and Mapbox:
- Intro to JSON: JavaScript Object Notation, used for storing and exchanging data.
- Mapbox-markers-example – Review GeoJSON
- Mapbox-markers alternate example
- Mapbox-markers-example-ZIP
Some Mapbox Examples
-
- Add a Clickable Marker: Learn how to add a marker to your map that responds to click events, displaying a popup with more information.
URL:Mapbox Docs - Add Multiple Markers: Discover how to add multiple markers to your map using GeoJSON data, each with custom popups.
URL:Mapbox Docs - Add Custom Icons with Markers: Customize your map markers with unique icons to represent different types of data or points of interest.
URL: Mapbox Docs - Fly to a Location: Use the
flyTo
method to smoothly animate the map’s camera to a new location upon an event, such as a button click.
URL: Mapbox Docs - Display a Map on a Webpage: Initialize and display a basic Mapbox map within an HTML element on your webpage.URL: Mapbox Docs
- Add 3D Terrain to a Map: Enhance your map by incorporating 3D terrain using a raster terrain source for a more immersive visualization.
URL: Mapbox Docs - Display Navigation Directions: Utilize the Mapbox Directions API to show turn-by-turn driving directions on your map, offering interactive route guidance.
URL: Mapbox Docs - Create a Draggable Marker: Add markers to your map that users can drag to different locations, useful for selecting points of interest or destinations.
URL: Mapbox Docs - Add a Geocoder (Search) Control: Incorporate a search box into your map, allowing users to find and zoom to addresses or places using the Mapbox Geocoding API.
URL: Mapbox Docs - Animate a Point Along a Route: Create animations that move a point smoothly along a predefined route, simulating movement such as a vehicle traveling on a path.
URL: Mapbox Docs - Display Real-Time Data: Learn how to update your map dynamically with real-time data, such as live vehicle locations or sensor readings.
URL: Mapbox Docs - Cluster Point Data: Visualize large datasets by clustering point data, making your map more readable and interactive.
URL: Mapbox Docs - Filter Features Within Map View: Implement functionality to filter and display features that are within the current map view, enhancing performance and user experience.
URL: Mapbox Docs - Draw a Polygon: Allow users to draw polygons on the map, which can be used for area selection or highlighting regions.
URL: Mapbox Docs - Measure Distances: Implement a tool that lets users measure distances between points on the map, useful for planning and analysis.
URL: Mapbox Docs
- Add a Clickable Marker: Learn how to add a marker to your map that responds to click events, displaying a popup with more information.
-
Design & Development Process:
- Choose a theme for your map-based narrative, such as a personal journey, historical exploration, or fictional adventure.
- Research MapBox API. What is possible?
- Sketch or storyboard the interaction of YOUR map. What is the best way to experience your map theme?
- Gather geolocations on Google Maps (right/control click to get long/lat and remember to reverse for MapBox.
- Create HTML and basic CSS with colored borders for the elements in the Map Project. Consider using CSS Grid, Flexbox, or position-fixed to place elements.For fixed body heights (no overflow), add the following CSS:
html, body { height: 100%; overflow: hidden; }
- Plan the JavaScript steps for what you need. Keep it simple, but be detailed. Don’t list features of the map interface. Think sequentially. To start you need a Geojson to hold necessary info, you need variables, etc.Then you need to think about what happens when the user interacts. What has to happen? What functions do you need?
- Build the very basics of the JavaScript (no effects or complex arrays) to ensure functionality. Try starting with just 3 locations.
- Add animations or transition effects using the classList method with CSS Animations or CSS transitions.
- Add more markers, images, media, text, and graphic elements.
- Complete CSS design for visual hierarchy.
- Test/Troubleshoot
WORKSHOP
Discuss ideas…
- Sketch interactive design
- generate HTML
- For next class, work out steps
- Optional workshop on Wed- this will focus on the JS steps and getting better at it!