CodingGarden / seedling-school-01-frontend-project

For your first project, you will build a frontend website with HTML, CSS and JavaScript. The website will communicate and integrate with a 3rd party Web API.
MIT License
106 stars 14 forks source link

IPMapVisulaiser Submission #3

Closed thomphil closed 2 years ago

thomphil commented 4 years ago

Project Name / Title

IPMapVisualiser

Your Name / Title

thomphill

Project Description

Shows the location of an IP address on a map.

Enter an IP address and click 'Find' to search for its location. https://github.com/thomphil/IPMapVisualiser

What 3rd Party Web API do you plan to use?

IP Vigilante

Which of the following describes you:

w3cj commented 4 years ago

I like it! If leaflet doesn't work for you, you can try mapbox, they have a pretty good free tier.

As a stretch feature, you might try finding an API that will automatically get a users IP address so they can click a button like "What's my IP?" Or "Find me on the map"

Looks good overall. Go ahead and get started!

w3cj commented 4 years ago

How is the project going so far? Any updates?

thomphil commented 4 years ago

I was having issues with a CORS error but this seemed to be due to IPVigilante API so I've started using IP-API and it's been a lot more smooth sailing. I'm successfully logging the JSON response.

In regard to your suggestion to use mapbox, it looks like I'm going to have to use an API key, shall I just post it publicly? or am I missing a trick here?

w3cj commented 4 years ago

It looks like you found another API that does not have the cors issue?

For mapbox, the API key is meant to be public. There is no way to hide keys in front-end code.

w3cj commented 4 years ago

Any updates to share?

w3cj commented 4 years ago

Any updates to share?