Hi there, I need assistance in developing the following requirements.
In my database, there is parking lot information. Let's say each parking lot has two attributes: id and address. Via a spring controller, I am passing a list of parking lots to a JSP page called displayAllPL.jsp that includes Google Maps API JavaScript code like this:
return new ModelAndView("/displayAllPL").addObject
("parkinglots", parkingLotList)
This allows me to access each address in the JSP as follows:
<c:forEach items="${parkinglots}" var="entry" varStatus="status">
${entry.address}
Requirement: I need to compare each of these parking lot addresses with the user's address (which I obtain using geocoder in the Google Maps API) and identify which ones are within a 10-mile distance from the user's address. For all the parking lot addresses within this range, I want to add markers on the Google Map. Each marker should also have a link to my controller that will display the parking lot information, as shown below:
<a href="/<c:url value='/parkingstatus.html?plid=${entry.id }' />"/>
Any assistance would be greatly appreciated since I struggle with JavaScript. Thank you in advance.