Question: Requirements - ( 2 5 pts ) : You must implement a Map from Leaflet, this map should default to US Coordinates, you must determine

Requirements -(25 pts):
You must implement a Map from Leaflet, this map should default to US Coordinates, you must determine the best view to be able to show all the randomly generated coordinates below
You must then add a Random Coordinator Generator function to be able to generate coordinates for you, The code is provided below:
function getRandomInRange(from, to, fixed){
return (Math.random()*(to - from)+ from).toFixed(fixed)*1;
//.toFixed() returns string, so '*1' is a trick to convert to number
}
You must create 3 Random Sets of Coordinates from this (Please use exact numbers I outlined)
Latitude Coordinates: getRandomInRange(30,35,3);
Longitude Coordinates: getRandomInRange(-90,-100,3);
Below the Map you should have Text for the following
Marker 1(Randomly Generated Coordinates Point 1)
Marker 2(Randomly Generated Coordinates Point 2)
Marker 3(Randomly Generated Coordinates Point 3)
For Each of these Markers you must make an API call to get the Locality of the Coordinate
The API to use is as follows:
The Locality of each should be shown below the Marker Text for each respective coordinate Desired Page:
Map of US
Marker 1: Latitude: 30.964, Longitude: -98.992
Locality: San Saba
Marker 2: Latitude: 32.885, Longitude: -96.188
Locality: District 3
Marker 2: Latitude: 32.178, Longitude: -93.386
Locality: District 3
Note: Your Coordinates and Localities will Vary as those will be randomly generated
Background
For this Lab we will be using Leaflet.js, this is a mapping Library.
This will help you implement a basic map.
Desired Page:
Map of US
Marker 1: Latitude: 30.964, Longitude: -98.992
Locality: San Saba
Marker 2: Latitude: 32.885, Longitude: -96.188
Locality: District 3
Marker 2: Latitude: 32.178, Longitude: -93.386
Locality: District 3
Note: Your Coordinates and Localities will Vary as those will be randomly generated
Requirements - ( 2 5 pts ) : You must implement a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!