Question
I need this to be an external JavaScript that links to an HTML5 document: A button to map the Current Location of the user A
I need this to be an external JavaScript that links to an HTML5 document:
A button to map the Current Location of the user
A Locations dropdown list (select)
A Mapped location description, latitude, and longitude span
A Map div element
A button to center the image on the map
A Link to the Google Maps JavaScript API
I need to use ES6 syntax: let and const rather than var (replacing functions with arrow functions is optional)
An event handler mapped to a function to find current location using button click event, a function to map selected location using select change event, and a function to center map using click event
I also need a global locations array and a global map object with properties map, marker, and latLong to hold the current map Google map object information
I don't know how to populate the locations array with at least three objects with properties description, latitude, and longitude (hint: use Google Maps to search for a location, then click on the location's marker select "What's here?" to get the location's latitude and longitude)
I need to populate the dropdown from the locations array objects using createElement and appendChild
I also need a handle window.onload event
I don't know how to use addEventListener method for all other event handlers
I need to be able to use the HTML5 geolocation to get the user's current location (latitude and longitude)
I don't know how to detect if the user's browser does not support HTML5 geolocation and provide a warning
I need be able to Map current location function, map a location from a dropdown list, display a mapped location marker, and to re-center the map to the mapped location marker
I can't use any inline Javascript of CSS
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started