my face

bryce

githublinkedin
HomeProjectsWork

Targeted Homes

VisitGitHubTargeted Homes

Why?

My wife and I are planning on moving to a new house, and her only two location requirements are being somewhere in NC, and within 20 minutes of a Target store.

How?

I have the locations of all the Targets in North Carolina in a database. On page load, we get all those locations and put them on the map.

When an address is entered in the search bar, we send that to my API, which sends a request to another API to geocode the address.

We are using the Google Maps Route Matrix API to get the nearest Target to that address. This API only supports 50 destination points, but there are 53 Targets in NC.

Make a circle ±0.5 lat/lon around the starting point, and check if there are any Targets in this circle. Try that a few times, adding 1 degree lat/lon each time.

We'll probably get a few Targets in that circle, so get the one with the shortest driving duration, and send the encoded polyline, along with other route and address information back to client.

The client then draws the route on the map, showing the user the closest Target, the distance, and driving duration to it.

With What?

Angular 17, .Net 7.0 Web API, PostgresQL database

Google Maps API (Maps, Geocoding, Routes)